Forum Discussion
Access Control based on URI and Referer
Thanks for your suggestions, I couldn't get them to work for me though, however the below did work as required.
when HTTP_REQUEST { if { not ( [HTTP::uri] contains "/scooter/vespa/" ) } { if { $static::ref_debug } { log local0. "Incoming referer: [HTTP::header Referer]" } switch -glob [string tolower [HTTP::header Referer]] { "https://.scooter.com" { if { $static::ref_debug } { log local0. "From allowed referrer - allow" } return } "http://.example.com*" { if { $static::ref_debug } { log local0. "local domain - allow" } return } default { if { $static::ref_debug } { log local0. "from disallowed referer - redirect" } HTTP::redirect [HTTP::header Referer] } } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com