Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

http_referer, strange problem

$
0
0
Hello

As a background there is one specific site we (for various reasons) don't allow to link to one directory in the nginx site.

Seems to be easy. If I put a PHP file in the directory it works just as wanted ie gives 403 error when accessed from unallowed domain (test so far). But the real contents I have to block is a flash-based e-book with a HTML file as the "head" of the flash. And when I access the html with the unwanted referer it opens the html and hence the flash.

My
(if $http_referer ~* (site-to-unallow|test-site)) {
return 403;
}

lies on the server level on a virtual host conf file (next to server_name, root and log-directives. I just don't get it, nor have I found any pointers from the Google-land...

Any suggestions?

hank

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>