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

Set host for default_url_options #15963

Merged
merged 3 commits into from
Jul 11, 2024
Merged

Set host for default_url_options #15963

merged 3 commits into from
Jul 11, 2024

Conversation

oliverguenther
Copy link
Member

@oliverguenther oliverguenther commented Jun 25, 2024

Since OpenProject manages its own host name setting, most often coming from either the packaged installation or an explicit ENV variable, we do not need to trust the HOST header to create our links. Instead, always use the host_name setting.

https://community.openproject.org/work_packages/55937

@oliverguenther oliverguenther requested a review from a team June 25, 2024 07:25
@oliverguenther oliverguenther force-pushed the fix/set-header-before-action branch 2 times, most recently from 641b12a to e677daf Compare June 25, 2024 12:01
@oliverguenther oliverguenther marked this pull request as draft June 25, 2024 13:46
@oliverguenther oliverguenther force-pushed the fix/set-header-before-action branch 2 times, most recently from 9b6f524 to cd0c1f1 Compare July 1, 2024 09:23
@oliverguenther oliverguenther force-pushed the fix/set-header-before-action branch 2 times, most recently from 2f62aac to b2f8fcb Compare July 1, 2024 12:19
@oliverguenther oliverguenther changed the title Set host headers in before_action Set host for default_url_options Jul 8, 2024
@oliverguenther oliverguenther force-pushed the fix/set-header-before-action branch 7 times, most recently from 432c64a to 80ee601 Compare July 8, 2024 12:05
@oliverguenther oliverguenther marked this pull request as ready for review July 8, 2024 12:05
@oliverguenther oliverguenther force-pushed the fix/set-header-before-action branch 2 times, most recently from 478a243 to 4ccfcac Compare July 8, 2024 13:59
This results in us having to use a bit more helpers around request and feature specs
to ensure that the configured host name also matches the requested one.
we can no longer manipulate the host name in a feature spec
@oliverguenther oliverguenther requested review from dombesz and removed request for a team July 10, 2024 13:27
@dombesz dombesz merged commit 5016d89 into dev Jul 11, 2024
11 checks passed
@dombesz dombesz deleted the fix/set-header-before-action branch July 11, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants