Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. location ~* ^/(css|js)/.+\.(css|js)$ {
  2. #checking if referer is from app1
  3. if ($http_referer ~ "^.*/app1"){
  4. return 417;
  5. }
  6.  
  7. #checking if referer is from app2
  8. if ($http_referer ~ "^.*/app2"){
  9. return 418;
  10. }
  11. }
  12. error_page 417 /app1$request_uri;
  13. error_page 418 /app2$request_uri;
  14.  
  15.  
  16. location /app1 {
  17. proxy_pass http://app1.com;
  18. }
  19.  
  20. location /app2 {
  21. proxy_pass http://app2.com;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement