pythondjangoproxycorscors-anywhere

Django reverse proxy server CORS


I am looking to write a route that works exactly like this https://github.com/Rob--W/cors-anywhere in django

I'm thinking it's similar like in this question Django as reverse proxy

My question is how to add cors headers into it. I've also take a look of this https://github.com/ottoyiu/django-cors-headers, will the reverse proxy simply works for CORS, just by adding the django-cors-headers?


Solution

  • The answer in Django-cors-headers not working does the trick, if you want an image simply change the content type in the response to match the image,