Laravel: Difference between revisions
Johan Efendi (talk | contribs) No edit summary |
Johan Efendi (talk | contribs) |
||
Line 35: | Line 35: | ||
Daftar ip4v bisa didapat di [https://www.cloudflare.com/ips/ https://www.cloudflare.com/ips/] | Daftar ip4v bisa didapat di [https://www.cloudflare.com/ips/ https://www.cloudflare.com/ips/] | ||
Atau bisa juga menggunakan plugins [https://github.com/monicahq/laravel-cloudflare Trust Cloudflare's Proxies for Laravel] |
Revision as of 13:30, 31 May 2024
Migration
Migrasi file spesifik
php artisan migrate:refresh --path=/database/migrations/fileName.php
Production
Khusus untuk cloudflare Untuk menghindari case: laravel was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint bisa ditambahkan middleware trusted proxies sbb:
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array<int, string>|string|null
*/
protected $proxies = [
'103.21.244.0/22',
'103.22.200.0/22',
'103.31.4.0/22',
'104.16.0.0/12',
'108.162.192.0/18',
'131.0.72.0/22',
'141.101.64.0/18',
'162.158.0.0/15',
'172.64.0.0/13',
'173.245.48.0/20',
'188.114.96.0/20',
'190.93.240.0/20',
'197.234.240.0/22',
'198.41.128.0/17'];
Daftar ip4v bisa didapat di https://www.cloudflare.com/ips/
Atau bisa juga menggunakan plugins Trust Cloudflare's Proxies for Laravel