lusca
lusca copied to clipboard
A way to defer the header setup
Hey all,
I was having problems between lusca
and another code I was trying to integrated, specifically speaking, doing redirections based on some conditions like expired sessions with 401 status code.
Could be possible to do something to defer the headers for some urls or some conditions?
Are you using this module with kraken or just standalone for an express
app maybe ?
Yes, I'm using kraken as baseline for my project.
then you must be able to filter routes using route
param in the appsec middleware config like this in your app's config.json
"middleware": {
"appsec": {
"route": "<regex-for-route-selection>"
}
}
The app sec is an internally defined config in kraken which you can find here https://github.com/krakenjs/kraken-js/blob/v1.0.x/config/config.json#L117-L131
What you are doing above is merging the route param for your apps appsec
middleware config.