Hi,
@ldez indeed, is not a reserved endpoint.
After couple of tests on a cloned container, I was able to trace the issue.
Nothing to do with Traefik, as is related to Nginx.
In v.1.11.8 directive absolute_redirect on;
has been introduced:
http://nginx.org/en/docs/http/ngx_http_core_module.html#absolute_redirect
It work fine if you use Nginx with standard ports:
server {
listen 80 default;
...
server_name your-domain.com;
....
location / {
index index.html index.php;
try_files $uri $uri/ /index.php;
}
Traefik GET http://your-domain.com/api-docs
return 301 header:
location: http://your-domain.com/api-docs/
<--- OK
BUT
Using non-80 port, http only and catch-all server_name:
server {
listen 8080 default;
...
# catch-all # server_name your-domain.com;
....
location / {
index index.html index.php;
try_files $uri $uri/ /index.php;
}
Traefik GET http://your-domain.com/api-docs
return 301 header:
location: http://nginx-container-name:8080/api-docs/
<--- here browser crash
because of absolute_redirect on;
this translate to:
$schema://$hostname:$port/$uri/
After turn that off
, it just use relative path /api-docs/
(ending in trailing slash). All good.
Personally, I'm surprised that this is happening because I only use:
try_files $uri $uri/ /index.php;
This try_files
directive should do internal check/redirects at nginx level, as docs said:
http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
Anyway, sorry for false alarm. Will check this on Nginx community.
Regards,