laravel-swagger-ui
laravel-swagger-ui copied to clipboard
Incorrect server resolution when deployed with docker
When I run my app using php artisan serve, it correctly sets the server URL to http://localhost:8000/.
When I deploy my app to ECS, it ignores server:url values from the spec and presents me with only one option: 0.0.0.0:8000. Then, when I want to execute any of the requests, it adds that value to the request URL, so it looks like this: .../swagger/0.0.0.0:8000/api/....
'server_url' => env('SWAGGER_URL'),
I have tried to modify config/swagger-ui.php by setting a custom ENV variable SWAGGER_URL with my server's public URL, but no luck, swagger-ui still shows this:
And the request URL contains .../swagger/0.0.0.0:8000/api/......
What am I doing wrong? 🤔