How to setup CSRF Trusted Origina domain on same server as Django docker app in plesk?

40 Views Asked by At

I currently have a django app installed on a Docker in Plesk. Id like to keep everything to basically localhost for any domain that I have hosted on the same server.

The only thing that works is adding the actual domain https://subdomain.domain.com. Its not ideal to do this as Id like to use the Django app on multiple domains/subdomains that I have hosted on my plesk server. I tried the '*' option and it does not work either. Been breaking my head all day testing this and I cant seem to get it to work. :/

The error I receive is this in docker: django.security.csrf log Forbidden (Origin checking failed - https://subdomain.domain.com does not match any trusted origins.)

Any help with experienced docker folks out there? - I am using the latest django installation

I've tried https://localhost, https://127.0.0.1, the docker ip https://172.17.0.3 and a bunch of other options and nothing works.

0

There are 0 best solutions below