M
M
mr_drinkens892017-01-05 22:26:42
Django
mr_drinkens89, 2017-01-05 22:26:42

How to connect https Django Rest API?

Good day.
I'm struggling with the task:
There is a backend written in python (Django Rest Framework). Also, there is an angular application (web version), and an ios application. You need to connect an ssl certificate.
When I connect https, the call via angular or ios does not work (XMLHttpRequest cannot load...Response for preflight is invalid (redirect)), although the admin panel starts up fine and works under https.
Tried through the CORS settings (both from the nginx side and from the Django side) - to no avail.
Apparently, somehow I'm doing the redirect incorrectly?
Let me know who has come across.
Thank you in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
stayHARD, 2017-01-06
@stayHARD

https://github.com/ottoyiu/django-cors-headers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question