Bug: Not respecting CORS policy causes blocked requests #291
-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
You can use It would be good to automate that though. |
Beta Was this translation helpful? Give feedback.
-
These symptoms are unlike anything I have ever heard and the middleware is used on thousands of sites serving millions of images. With the default hashing strategy in place collision opportunities are 1 in 10s of millions. I haven’t forgotten about the CORS fix. I have local code that returns the correct response I’m just not sure whether the middleware is the best place to do so. Normally CORS behaviours are configured against individual endpoints in the routing configuration. |
Beta Was this translation helpful? Give feedback.
You can use
ImageSharpMiddlewareOptions.OnPrepareResponseAsync
to further augment the response headers before sending.It would be good to automate that though.