Hi Jagadesh,

On 15/12/2018 11.59, JAGADESH M wrote:
Hi,
       I am new to django when i run Django REST API by default it is showing *http://127.0.0.1* that's fine. But when i go deployment when i run APIs, even there it's running in insecure(http) only like *http://myproductionip *. so can anyone help me to resolve this problem. thank you


You haven't provided any information on how you are deploying your application in production, but I assume (or hope) you are running some kind of web server (eg. nginx or Apache) which is communicating with your Django app through uwsgi.

You'll need to set up your web server to serve through HTTPS. How that is done depends on the kind of web server you are running, but there should be tons of tutorials for that.

You'll also need a certificate. You can get one for free from letsencrypt.org, but if you're working for someone, you should probably ask someone where and how to deal with that instead.

It would also be a good idea to redirect insecure (HTTP through port 80) requests to secure (HTTPS through port 443) requests. There should be tons of tutorials for that as well for whatever web server you are using.

Hope that helps.

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0934cc7b-d3df-5bc0-fc1f-f4a490e2630e%40stacktrace.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to