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

Update matrix-domain.conf.j2 - trying to fix issue #2954 #2985

Merged
merged 6 commits into from
Nov 9, 2023

Conversation

jolly-jump
Copy link
Contributor

@jolly-jump jolly-jump commented Nov 8, 2023

exchanged ^~ with ~ as a pattern matching in the location part. I am very sure, that it only works using ~. I am not quite sure though, if this is the right way to do it, because ~ is probably more expensive than ^~

the rewrite has to be behind the definition of the $backend. Otherwise nginx will fail to work. This is probably because "break" goes directly to the proxy_pass which uses $backend.

exchanged "^~" with "~" as a pattern matching in the location part.
I am very sure, that it only works using "~". I am not quite sure though, if this is the right way to do it, because "~" is probably more expensive than "^~"

the rewrite has to be behind the definition of the $backend. Otherwise nginx will fail to work. This is probably because "break" goes directly to the proxy_pass which uses $backend.
also change the order of "set $backend" and "rewrite" here in the 3pid registration section
@spantaleev
Copy link
Owner

I suppose we need the same if (and rewrite block) once again a bit below then, to cover the else statement?

as you said: repeat it for the else-case, where the ma1sd might be running on sans_container.
jolly-jump and others added 2 commits November 8, 2023 21:20
atrix_nginx_proxy_proxy_matrix_3pid_registration_v3_to_r0_redirect_enabled
is the right variable to check (twice) in the corresponding branch.
@jolly-jump
Copy link
Contributor Author

Hi. So I did what you suggested.
This PR works now as expected for user_directory search.
Do you want me to rebase and make a new PR?
Pretty messy six commits for the small change 🤷 ?

@spantaleev spantaleev merged commit 81ee074 into spantaleev:master Nov 9, 2023
2 checks passed
@spantaleev
Copy link
Owner

Thanks for fixing it! I've squashed it, so it's clean enough now.

cvwright pushed a commit to cvwright/matrix-docker-ansible-deploy that referenced this pull request Jan 11, 2024
…pantaleev#2985)

* Update matrix-domain.conf.j2

exchanged "^~" with "~" as a pattern matching in the location part.
I am very sure, that it only works using "~". I am not quite sure though, if this is the right way to do it, because "~" is probably more expensive than "^~"

the rewrite has to be behind the definition of the $backend. Otherwise nginx will fail to work. This is probably because "break" goes directly to the proxy_pass which uses $backend.

* Update matrix-domain.conf.j2

also change the order of "set $backend" and "rewrite" here in the 3pid registration section

* Update matrix-domain.conf.j2 - repeat v3_to_r0 rewrite in else-statement

as you said: repeat it for the else-case, where the ma1sd might be running on sans_container.

* Update matrix-domain.conf.j2 - corrected wrong variable

atrix_nginx_proxy_proxy_matrix_3pid_registration_v3_to_r0_redirect_enabled
is the right variable to check (twice) in the corresponding branch.

* matrix-domain.conf.j2 - fix-2954: change all whitespaces to tabs as you do it

---------

Co-authored-by: Tobias Küchel <t.kuechel@humboldt-ka.de>
KarolosLykos pushed a commit to KarolosLykos/matrix-docker-ansible-deploy that referenced this pull request Mar 5, 2024
…pantaleev#2985)

* Update matrix-domain.conf.j2

exchanged "^~" with "~" as a pattern matching in the location part.
I am very sure, that it only works using "~". I am not quite sure though, if this is the right way to do it, because "~" is probably more expensive than "^~"

the rewrite has to be behind the definition of the $backend. Otherwise nginx will fail to work. This is probably because "break" goes directly to the proxy_pass which uses $backend.

* Update matrix-domain.conf.j2

also change the order of "set $backend" and "rewrite" here in the 3pid registration section

* Update matrix-domain.conf.j2 - repeat v3_to_r0 rewrite in else-statement

as you said: repeat it for the else-case, where the ma1sd might be running on sans_container.

* Update matrix-domain.conf.j2 - corrected wrong variable

atrix_nginx_proxy_proxy_matrix_3pid_registration_v3_to_r0_redirect_enabled
is the right variable to check (twice) in the corresponding branch.

* matrix-domain.conf.j2 - fix-2954: change all whitespaces to tabs as you do it

---------

Co-authored-by: Tobias Küchel <t.kuechel@humboldt-ka.de>
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.

None yet

2 participants