Notifications
Clear all
BugOverflow
2
Posty
1
Users
0
Reactions
1,478
Widok
0
03/09/2018 2:33 pm
Topic starter
how to fix base url? indead of local hostname
2 Answers
0
03/09/2018 2:36 pm
Topic starter
1. edit /routes/api.php
2. add
1 2 3 4 5 6 7 8 9 10 |
$proxy_url = getenv('PROXY_URL'); $proxy_schema = getenv('PROXY_SCHEMA'); if (!empty($proxy_url)) { URL::forceRootUrl($proxy_url); } if (!empty($proxy_schema)) { URL::forceSchema($proxy_schema); } |
$proxy_url = getenv('PROXY_URL'); $proxy_schema = getenv('PROXY_SCHEMA'); if (!empty($proxy_url)) { URL::forceRootUrl($proxy_url); } if (!empty($proxy_schema)) { URL::forceSchema($proxy_schema); }
3. edit .env file
4. put
1 2 |
PROXY_URL = http://internet.address.com PROXY_SCHEMA = http |
PROXY_URL = http://internet.address.com PROXY_SCHEMA = http
0
03/09/2018 3:19 pm
Topic starter
WARNING!: this solution is not working for /login methon od auth controller.
WORKAROUND: try to change ProxyPass url from my.service.local to my.service.com and modify /ets/hosts file of those two servers to point that my.service.com to local ip address of internal server