Welcome! Log In Create A New Profile

Advanced

sub filter path

Posted by tusill12 
sub filter path
November 15, 2020 12:55PM
I am trying to set up nginx reverse proxy with my application. I need to be able to only allow subdomain.domain. I have a login that redirects the browser to subdomain.domain/path. That works fine. However I found out that you can bypass the authorization page by simply going to subdomain.domain/path. I have experimented with sub filters but have only been able to lock out the path.... Is there a better mechanism that sub filters to accomplish this. Here is a copy of the config:

server {

server_name abc.domain;

location = /robots.txt {
add_header Content-Type text/plain;
return 200 "User-agent: *\nDisallow: /\n";
}


location / {
#subfilter
sub_filter_types text/css text/javascript;
sub_filter path /; //this should send abc.domain/path to abc.domain until user authenticates
sub_filter_once on;



Edited 1 time(s). Last edit at 11/15/2020 12:56PM by tusill12.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 79
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready