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

New Release v4.1.0 - #minor #70

Merged
merged 3 commits into from
Oct 28, 2024
Merged

New Release v4.1.0 - #minor #70

merged 3 commits into from
Oct 28, 2024

Commits on Sep 18, 2024

  1. PB-737: Fix CORS issues when working on localhost

    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.
    ltshb committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    c23849a View commit details
    Browse the repository at this point in the history
  2. PB-737: Simplified regex for allowed domain

    Instead of given regex for the full url, only provide regex for the host part
    of the url. This allow to not touch the configuration on deployment.
    ltshb committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    14df815 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #69 from geoadmin/bug-PB-737-allow-domain

    PB-737: Fix CORS issues when working on localhost
    ltshb authored Sep 18, 2024
    Configuration menu
    Copy the full SHA
    f6a2f59 View commit details
    Browse the repository at this point in the history