Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Server] Add option to handle header set by a proxy #8626

Closed
FirelightFlagboy opened this issue Oct 4, 2024 · 0 comments · Fixed by #8675
Closed

[Server] Add option to handle header set by a proxy #8626

FirelightFlagboy opened this issue Oct 4, 2024 · 0 comments · Fixed by #8675
Assignees
Labels
A-Server Area: Parsec Server

Comments

@FirelightFlagboy
Copy link
Contributor

FirelightFlagboy commented Oct 4, 2024

A Parsec server could be configured behind a reverse proxy (like apache or traefik).
But currently the server does not use the headers added by the proxy (Forwarded-* or X-Forwarded-*).

Important

The server should not use those headers by default, the sysadmin should explicitly enable the server to use those headers.

This could cause issue when the server generate link like for bootstrapping an organization where it only use the scheme of the request instead of looking for the forwarded header:

use_ssl=request.url.scheme == "https",

We could take inspiration of keycloak has the optional option --proxy-headers {forwarded|xforwarded}

@FirelightFlagboy FirelightFlagboy added the A-Server Area: Parsec Server label Oct 4, 2024
@FirelightFlagboy FirelightFlagboy self-assigned this Oct 4, 2024
FirelightFlagboy added a commit that referenced this issue Oct 8, 2024
Add a new option that configure the list of trusted address to parse the proxy headers from.
The parsing is handled by `uvicorn` which currently only support `x-forwarded-{for,proto}` headers.

Closes #8626, closes #8427
FirelightFlagboy added a commit that referenced this issue Oct 8, 2024
Add a new option that configure the list of trusted address to parse the proxy headers from.
The parsing is handled by `uvicorn` which currently only support `x-forwarded-{for,proto}` headers.

Closes #8626, closes #8427
FirelightFlagboy added a commit that referenced this issue Oct 8, 2024
Add a new option that configure the list of trusted address to parse the proxy headers from.
The parsing is handled by `uvicorn` which currently only support `x-forwarded-{for,proto}` headers.

Closes #8626, closes #8427
FirelightFlagboy added a commit that referenced this issue Oct 9, 2024
Add a new option that configure the list of trusted address to parse the proxy headers from.
The parsing is handled by `uvicorn` which currently only support `x-forwarded-{for,proto}` headers.

Closes #8626, closes #8427
@FirelightFlagboy FirelightFlagboy linked a pull request Oct 9, 2024 that will close this issue
FirelightFlagboy added a commit that referenced this issue Oct 9, 2024
Add a new option that configure the list of trusted address to parse the proxy headers from.
The parsing is handled by `uvicorn` which currently only support `x-forwarded-{for,proto}` headers.

Closes #8626, closes #8427

Co-authored-by: Marcos Medrano <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Oct 10, 2024
Add a new option that configure the list of trusted address to parse the proxy headers from.
The parsing is handled by `uvicorn` which currently only support `x-forwarded-{for,proto}` headers.

Closes #8626, closes #8427

Co-authored-by: Marcos Medrano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Server Area: Parsec Server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant