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

Revise access control expose header #280

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Revise access control expose header #280

wants to merge 3 commits into from

Commits on Sep 30, 2020

  1. return Access-Control-Expose-Headers only if content request

    -Access-Control-Expose-Headers is only for what content response headers
     can be visible inside Javascript, nobody will do XHR preflight OPTIONS
     verb by hand, saves bytes on wire and undefined behaviour
    
    -dont deref request.corsAnywhereRequestState.corsMaxAge unless value
     used
    
    source
    
    https://web.archive.org/web/20200110204952/https://www.html5rocks.com/static/images/cors_server_flowchart.png
    bulk88 committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    9122213 View commit details
    Browse the repository at this point in the history
  2. "Access-Control-Expose-Headers" shouldnt contain access-control-* values

    -XHR code will not inspect the A-C-* values, it can't even get them with
     getResponseHeader() if their is a fault with A-C-* headers
    
    moving "headers['access-control-allow-origin'] = '*';" to after
    Expose-Headers computation keeps "access-control-allow-origin" out of
    Expose-Headers value
    bulk88 committed Sep 30, 2020
    Configuration menu
    Copy the full SHA
    b453f56 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    455cdb6 View commit details
    Browse the repository at this point in the history