I have NGINX as proxy with SSL for background Tomcat server with ORDS/Apex. I am trying to block access to admin login page. Url to page looks like this: https://10.10.10.10/ords/f?p=4550:1:10500576264651:::::
The part of URL is fixed (/ords/f?p=4550) and everything after (:1:10500576264651::::: ) is dynamic.
I'm trying to block ALL requests that have string "/ords/f?p=4550" in URL. For ordinary directory block works good, but when need to read URL I cant make it work.
#This do not work
location ^~ /ords/f?p=4550 {
return 404;
}
#This works
location ^~ /janko {
return 400;
}
I managed this in HAProxy relatively easy by reading ALC like this and redirecting to 404 page
#Recognize patern
acl denyPath url_beg /ords/f?p=4550
#Use backend that redirect to 404
use_backend redirectTo404 if denyPath
Do anybody have any idea how to do this on NGINX?