Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

Is there functionality to ignore a route? #5

Closed
ssolbak opened this issue Sep 14, 2015 · 2 comments
Closed

Is there functionality to ignore a route? #5

ssolbak opened this issue Sep 14, 2015 · 2 comments

Comments

@ssolbak
Copy link

ssolbak commented Sep 14, 2015

We have a single route that we want to be allowed to be framed. Is there a way to ignore by route rather than by host?

@EvanHahn
Copy link
Member

Yes, but that would be at the Express layer.

To remove all of Frameguard from a route:

app.get('/my-route-that-can-be-framed', function (req, res) {
  res.removeHeader('X-Frame-Options');
  // ...the rest of your handler...
});

To use a different Frameguard setup from a route:

app.get('/my-route-that-can-be-framed', frameguard('sameorigin'), function (req, res) {
  // ...the rest of your handler...
});

Does that help?

@ssolbak
Copy link
Author

ssolbak commented Sep 14, 2015

Very much thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants