ntex-rs / examples

Apache License 2.0
81 stars 19 forks source link

Setting Access-Control-Allow-Origin: * for all resources #8

Closed vasily-kartashov closed 3 years ago

vasily-kartashov commented 3 years ago

Is there a way to set the header Access-Control-Allow-Origin: * for all resources, without going with_header on each and every one of them?

fafhrd91 commented 3 years ago

you can use ntex-cors if you need cors support or DefaultHeader middleware

vasily-kartashov commented 3 years ago

@fafhrd91 It seems that ntex-cors only supports ntex: 0.1, but I also use ntex-files with requires ntex: 0.3. Is there a way to avoid / resolve conflict?

fafhrd91 commented 3 years ago

cors from master supports 0.3