Closed marcelleza8 closed 1 year ago
The @routes
Blade directive uses the URL of the current request, not your APP_URL
. Are you visiting the app in your browser at http://10.1.1.20:8083
? If you are, that's the issue.
If not, it may have something to do with your Docker container setup. If the request is being forwarded through any kind of proxy or Laravel is running on a different host than the webserver, make sure your Trusted Proxies and Trusted Hosts are configured.
Ziggy version
^1.0
Laravel version
^10.0
Description
In .env file APP_URL and ASSETURL are both "http://domain.com.br/site2" I put on app.blade.php the directive @routes, after that i run "php artisan ziggy:generate", the /resources/js/ziggy.js file show the correct configuration: const Ziggy = {"url":"http:\/\/www.domain.com.br\/site2","port":null,"defaults":{},"routes":{"sanctum.csrf-cookie" ... , but when i access e check the source code, appears the server and port server: const Ziggy = {"url":"http:\/\/10.1.1.20:8083","port":8083,"defaults":{},"routes":{"sanctum.csrf-cookie":_ .... The app its inside a docker container using nginx and app with PHP services. Its first time this happend and don't know how to put the domain instead of IP address/port in to source code.
P.S = the @vite('resources/js/app.js') directive, show the correct domain
Thanks in advance
Ziggy call and context
Ziggy configuration
Route definition