Skip to content

Conversation

lutra
Copy link

@lutra lutra commented Aug 28, 2019

Maybe the project should be named cors-somewhere then, but it can be used in production environment without the risk of having a proxy to sites I do not permit.

lutra added 2 commits August 28, 2019 15:16
Define a regular expression to environment variable
CORSANYWHERE_TARGET_WHITELIST to permit access to targets only.
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.3%) to 98.673% when pulling 86a5777 on lutra:master into 4814647 on Rob--W:master.

return;
}

if (corsAnywhere.checkTargetWhitelisted && !corsAnywhere.checkTargetWhitelisted(location)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not the right place to enforce target restrictions, because it does not account for redirects.

I once started with a patch to limit targets, in #78, but never finished it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants