Usually the schema in your links will reflect the schema used on the site. It looks like your running locally in a development environment, when you go to a production site the schema should change, assuming you use TSL in production. You may be able to force it while developing, but I see no reason to do that. You can check if what I say is correct by building an Apache config file which uses TCL and running your site through that locally.
~Carl On Sat, Feb 1, 2020 at 9:19 AM Muzammil Hussain < muzammil.hussain.s...@gmail.com> wrote: > I would like to get https links for resources instead of the current http > links. > > Example currently I get something like this: > http://10.16.18.46:9000/media/tds_data/2020/2/1/6328/cat.12233.jpg > > what should I change in the get request in views.py > > def get(self, request, format=None): > files = Files.objects.all() > serializer = FilesSerializer(files, many=True) > print(serializer.data) > return Response(serializer.data) > > > -- > You received this message because you are subscribed to the Google Groups > "Django REST framework" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-rest-framework+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-rest-framework/616452dd-275e-48db-99d7-10f02832026c%40googlegroups.com > <https://groups.google.com/d/msgid/django-rest-framework/616452dd-275e-48db-99d7-10f02832026c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- ------------------------------------------------------------------------------- Carl J. Nobile (Software Engineer) carl.nob...@gmail.com ------------------------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/CAGQqDQJsse7pxM1agY%2B9C1iC6my%2Bwyged%3DDZHJ6MiP_dib0tQA%40mail.gmail.com.