openwisp / ansible-openwisp2

Ansible role that installs and upgrades OpenWISP.
https://openwisp.io/docs/dev/ansible/
BSD 3-Clause "New" or "Revised" License
474 stars 136 forks source link

The CORS_REPLACE_HTTPS_REFERER setting has been removed #480

Open cbeaujoin-stellar opened 1 month ago

cbeaujoin-stellar commented 1 month ago

TASK [openwisp.openwisp2 : Migrate] ********************************************************************************************************************************************************************************************************* fatal: [openwisp.intra.stellar.tc]: FAILED! => {"changed": false, "cmd": ["./manage.py", "migrate", "--noinput"], "msg": "\n:stderr: SystemCheckError: System check identified some issues:\n\nERRORS:\n?: (corsheaders.E013) The CORS_REPLACE_HTTPS_REFERER setting has been removed - see django-cors-headers' CHANGELOG.\n", "path": "/mnt/openwisp/env/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "syspath": ["/tmp/ansible_django_manage_payload_u33yn5qn/ansible_django_manage_payload.zip", "/usr/lib/python311.zip", "/usr/lib/python3.11", "/usr/lib/python3.11/lib-dynload", "/usr/local/lib/python3.11/dist-packages", "/usr/lib/python3/dist-packages", "/usr/lib/python3.11/dist-packages"]}

https://github.com/openwisp/ansible-openwisp2/blob/dcdcd21aa59c38a401cd7bcdb1adfbf24de1ffbe/templates/openwisp2/settings.py#L565

It should be replace by: CSRF_TRUSTED_ORIGINS = {{ openwisp2_django_cors.get('allowed_origins_list', []) }}

Ref: https://github.com/openwisp/ansible-openwisp2/issues/443#issuecomment-2129177709