-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fix contact insertion #3305
base: develop
Are you sure you want to change the base?
Fix contact insertion #3305
Conversation
On the testserver, we have multiple possible backend urls. So instead of using full urls, we can just use relative urls (For some reason called absolute urls in our codebase)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking this on so quickly!
Curious, do you think we could just adjust the full_url
definition?
I think that should also be possible. It would probably be a bit more robust, because it would make contact cards independent of base url changes |
@charludo I'm not sure if there is a way to get this to work, do you have an idea? |
Huh, I didn't even think to make the URLs relative - I think that may be a great solution though? |
Short description
On the testserver we have multiple possible backend urls, and the contacts were previously loaded using their complete server url. For example, if a user was on
https://cms-test.integreat-app.de
the contact was still loaded usinghttps://integreat-test.tuerantuer.org
. Then the login form would be returned, because the user had of course no valid session for the other url.So instead of using full urls, we can just use relative urls, like we do for all other links.
It's a bit hard to test this pr, because everything worked anyways on localhost, but I hope the explanation helps :)
I also considered adding
redirect: "error",
to the fetch call. This would at least have prevented that the full login form gets pasted. But maybe that is something we should add to all our fetch calls?Proposed changes
Side effects
Should be none
Resolved issues
Fixes: #3304
Pull Request Review Guidelines