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

Fix 'isRequestOriginAllowed' returns mixed results when regex is used #152

Merged
merged 1 commit into from
Feb 23, 2022
Merged

Fix 'isRequestOriginAllowed' returns mixed results when regex is used #152

merged 1 commit into from
Feb 23, 2022

Commits on Feb 22, 2022

  1. Fix 'isRequestOriginAllowed' returns mixed results when regex is used

    The 'isRequestOriginAllowed' function returned random results for
    global regexes, since the .test function was used, and the output
    of this function depends on previous invocations of the function. By
    resetting the 'lastIndex', every invocation of the function should now
    return the same result.
    
    This also updates the corresponding test to use a global regex, and do
    the same validation twice, in order to check consistency
    
    fixes #151
    Tom Brouwer committed Feb 22, 2022
    Configuration menu
    Copy the full SHA
    e95a995 View commit details
    Browse the repository at this point in the history