I have a website that offers 3 serviceroutes that is written in MVC and running under IIS. When I set things like Access-Control-Allow-Origin
, Access-Control-Allow-Methods
, etc. this is done via the web.config and it sets it for all serviceroutes. Is is possible to set these values for each serviceroute via the web.config via the <httpProtocol><customHeaders>
or would have to set these in code per serviceroute and add them as user defined values in the <appSetting><add key>
.
When I say serviceroutes I mean:
https://mywebsite/service1
https://mywebsite/service2
https://mywebsite/service3
I don’t want to hard-code any of these values beyond them being in the web.config file. And I don’t have the option of re-writing this as 3 separate services/websites. 🙂