Reputation: 135
When using ITHit WebDAV server it applies its own CORS settings, this is OK for the Verbs and Methods in my case. However it only allows on to configure one Origin, in my case I have multiple origins I need to support. So is it possible to make ITHit use the origin settings that is configured on an application level without it overwriting it?
Upvotes: 0
Views: 176
Reputation: 135
I ended up creating my own middleware that adds/replaces the Access-Control-Allow-Origin header on the response after it has passed the ItHit middleware, with the Origin from the request if valid. If the request is invalid is still up in the air as there are multiple flavors on how to deal with it, for now i just send a 403 without processing the request.
I hope IT Hit will do an update to not roll their own implementation and use the native one part of Asp.Net Core.
Upvotes: 0