-
Notifications
You must be signed in to change notification settings - Fork 16
[feature-request] Allow array of domains as options #6
Comments
Every spec I found showed that |
No. Yet it's a common dev issue I've encountered in many projects when you handle different resources. I was thinking that it could be handled like this internally: function frameguard (action, options) {
// ...
if ('allow-from' === action) {
let allowFrom = (options.indexOf(req.hostname) >= 0 ? req.hostname : options[0];
req.setHeader('X-Frame-Options', 'ALLOW-FROM ' + allowFrom);
}
// ...
} for the case |
This is a good idea. Two thoughts:
I'd definitely love a pull request if you're willing. |
Yes, I need that feature too! Why the wait? |
I've managed to create a PR with this feature. I've been trying to fix the tests. But current impl is not very informative. I could use some help figuring out what is going on with the last 2. |
|
Found it! n/m. PR is ready for review 👯 |
Those assertion errors should be made more informative. Could you submit the PR and I'll take a look, even if it's incomplete? |
@EvanHahn It's passing green now! 😄 |
Thanks! I'll take a look soon.
|
Closing in favor of #12. |
Something like:
Perhaps also a regex?
The text was updated successfully, but these errors were encountered: