Advertisement
Guest User

Untitled

a guest
Oct 28th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. GET /git/sample-repository/info/refs?service=git-receive-pack HTTP/1.1
  2.  
  3. server {
  4. #... commond definitions such as server, root
  5.  
  6. location / {
  7. error_page 418 = @queryone;
  8. error_page 419 = @querytwo;
  9. error_page 420 = @querythree;
  10.  
  11. if ( $query_string = "service=git-receive-pack" ) { return 418; }
  12. if ( $args = "service=git-send-pack" ) { return 419; }
  13. if ( $arg_somerandomfield = "somerandomvaluetomatch" ) { return 420; }
  14.  
  15. # do the remaining stuff
  16. # ex: try_files $uri =404;
  17.  
  18. }
  19.  
  20. location @queryone {
  21. # do stuff when queryone matches
  22. }
  23.  
  24. location @querytwo {
  25. # do stuff when querytwo matches
  26. }
  27.  
  28. location @querythree {
  29. # do stuff when querythree matches
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement