Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- location ~* ^/(css|js)/.+\.(css|js)$ {
- #checking if referer is from app1
- if ($http_referer ~ "^.*/app1"){
- return 417;
- }
- #checking if referer is from app2
- if ($http_referer ~ "^.*/app2"){
- return 418;
- }
- }
- error_page 417 /app1$request_uri;
- error_page 418 /app2$request_uri;
- location /app1 {
- proxy_pass http://app1.com;
- }
- location /app2 {
- proxy_pass http://app2.com;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement