naxsi icon indicating copy to clipboard operation
naxsi copied to clipboard

Redirect URL based on certain checkrule

Open Taymindis opened this issue 2 years ago • 7 comments

Hi,

I am just wondering any other way to redirect URL OR multiple Denied URL based on certain rule? Instead of one deniedURL for all

Taymindis avatar Mar 26 '22 00:03 Taymindis

why would you need such feature? can you explain your scenario where this could be useful?

wargio avatar Mar 26 '22 10:03 wargio

We have a scenario which handle some special case of security and proxy to another data analysis service. I wish naxsi can have a feature to handle individual deniedUrl

Taymindis avatar Mar 26 '22 12:03 Taymindis

Hmm sounds like a good feature. i'm adding this to the list of TODOs.

wargio avatar Mar 26 '22 12:03 wargio

This could be implemented using some tags:

DeniedURL "/path/to/403.html";
DeniedURL "/different/path" MYTAG1;

CheckRule "$FOO > 8" DROP; # redirects using default route;
CheckRule "$MALICIOUS > 8" DROP MYTAG1; # redirects using MYTAG1 route;

wargio avatar Mar 26 '22 13:03 wargio

You actually can just return status, we will handle error by ourself

Taymindis avatar Mar 26 '22 14:03 Taymindis

i see, but that is not how it works internally.

wargio avatar Mar 26 '22 15:03 wargio

i see, but that is not how it works internally.

Ya I can see that, it’s quite different with modsecurity.

Taymindis avatar Mar 27 '22 00:03 Taymindis