Skip to content

Support proxy CSRF settings - #26

Merged
Daniel-VM merged 2 commits into
BIPLAT-CIBERINFEC:developfrom
Daniel-VM:proxy-csrf-settings
Aug 11, 2026
Merged

Support proxy CSRF settings#26
Daniel-VM merged 2 commits into
BIPLAT-CIBERINFEC:developfrom
Daniel-VM:proxy-csrf-settings

Conversation

@Daniel-VM

@Daniel-VM Daniel-VM commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Add comma-separated environment parsing for host/origin settings.
  • Expose PATHOCORE_API_CSRF_TRUSTED_ORIGINS for Django admin and Swagger login behind HTTPS reverse proxies.
  • Configure Django to trust proxy-provided X-Forwarded-Proto and X-Forwarded-Host headers.
  • Move the canonical API documentation routes to /v1/openapi/, /v1/swagger/, and /v1/swagger/redoc/.
  • Keep redirects from the legacy documentation routes so existing links still land on the v1 docs.

This aligns PathoCore API with the proxy/CSRF handling added for MePRAM OMOP API in BU-ISCIII/mepram-omop-api#18.

@Daniel-VM
Daniel-VM marked this pull request as ready for review August 11, 2026 07:41
@Daniel-VM
Daniel-VM merged commit 9fc6690 into BIPLAT-CIBERINFEC:develop Aug 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant