Django reverse proxy server CORS

2k views Asked by At

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?

1

There are 1 answers

0
Louis Lesmana On BEST ANSWER

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,