We use nginx as proxy for our play framework 1.2.7 server. Some of the routes in play framework use a <.*> wildcard, the one in question here looks like

GET     /media/{bucket}/{id}/inline/{<.*>config}    MediaCtl.getMediaInlineImgIx

The config can contain a http server and for some reason nginx strips away one of the / in http:// . For example:

13:07:59,299 INFO  [play] ~ Anonymous Guest ~ MediaCtl.getImgIx(): config {"w":100,"h":65,"origin":"http:/localhost:8080","fit":"max"}

when using nginx via localhost:8080. When calling localhost:9010 directly I get

13:19:25,648 INFO  [play] ~ Anonymous Guest ~ MediaCtl.getImgIx(): config {"w":100,"h":65,"origin":"http://localhost:9010","fit":"max"}

I see no messages in access.log or error.log with regards to the URL mangling that seems to occur. Any suggestions on how to fix this?


1 Answer 1


nginx merges slashes from URLs on default see: http://nginx.org/en/docs/http/ngx_http_core_module.html#merge_slashes

You must use: merge_slashes off;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.