Laravel: Difference between revisions
Johan Efendi (talk | contribs) |
Johan Efendi (talk | contribs) No edit summary |
||
Line 5: | Line 5: | ||
php artisan migrate:refresh --path=/database/migrations/fileName.php | php artisan migrate:refresh --path=/database/migrations/fileName.php | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=Production= | |||
Khusus untuk '''cloudflare''' Untuk menghindari case: laravel was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint bisa ditambahkan middleware trusted proxies sbb: | |||
<syntaxhighlight lang="php"> | |||
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']; | |||
</syntaxhighlight> | |||
Daftar ip4v bisa didapat di [https://www.cloudflare.com/ips/ https://www.cloudflare.com/ips/] |
Revision as of 13:18, 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/