为什么nginx删除URL中的一个/?

我们使用nginx作为我们的play framework 1.2.7服务器的代理。 一些播放框架中的路由使用了一个<。*>通配符,这个问题在这里看起来像

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

该configuration可以包含一个http服务器,由于某种原因,nginx将去掉http://中的/。 例如:

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

当通过localhost:8080使用nginx的时候。 当直接调用localhost:9010时,我得到了

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

我在access.log或error.log中看不到任何消息,关于似乎正在发生的URL调整。 对于如何解决这个问题,有任何的build议吗?

nginx在默认情况下合并了URL的斜杠: http : //nginx.org/en/docs/http/ngx_http_core_module.html#merge_slashes

你必须使用:merge_slashes off;