.net core , how to handle route with extra leading slash

后端 未结 2 898
天命终不由人
天命终不由人 2021-01-16 06:46

I need to handle an incoming request which is of the form: //ohif/study/1.1/series Note the exta slash at the front

My controller signature is:

[Rout         


        
2条回答
  •  礼貌的吻别
    2021-01-16 07:07

    Rewrite the URL at the web server-level, e.g. for IIS, you can use the URL Rewrite Module to automatically redirect //ohif/study/1.1/series to /ohif/study/1.1/series. This isn't a job for your application.

提交回复
热议问题