generated from geoadmin/template-service-flask
-
Notifications
You must be signed in to change notification settings - Fork 0
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
PB-737: Block shortening of external urls #66
Merged
LukasJoss
merged 5 commits into
develop
from
feat-PB-737-block-shortening-of-external-urls
Aug 8, 2024
Merged
PB-737: Block shortening of external urls #66
LukasJoss
merged 5 commits into
develop
from
feat-PB-737-block-shortening-of-external-urls
Aug 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LukasJoss
force-pushed
the
feat-PB-737-block-shortening-of-external-urls
branch
3 times, most recently
from
August 7, 2024 14:04
00d9729
to
a1cbeb1
Compare
LukasJoss
force-pushed
the
feat-PB-737-block-shortening-of-external-urls
branch
from
August 7, 2024 14:09
a1cbeb1
to
cdf2799
Compare
benschs
reviewed
Aug 8, 2024
benschs
approved these changes
Aug 8, 2024
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.
Thanks
ltshb
added a commit
that referenced
this pull request
Sep 18, 2024
Previous PR #66 was too restrictive has it blocked localhost on the DEV staging which is needed to develop the web-mapviewer. The main issue was that the ALLOWED_DOMAINS config was used for CORS and for URL parameter check, but in the code the logic to validate CORS and url parameter differ, due to this it was not possible anymore to set a ALLOWED_DOMAINS value that would allow localhost as CORS and or as url parameter. The url parameter check wanted to have a regex to exactly match the host name without the path, while CORS did check the full url. Now the code has been simplified and we use the same function/logic to test url and CORS, using the full url. Note that ORIGIN and REFERER header based on the documentation should always has the scheme http:// or https://. Referer might have a path or not. So now the ALLOWED_DOMAINS must be a pattern that match a full URL not only part of it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.