Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GET /git/sample-repository/info/refs?service=git-receive-pack HTTP/1.1
- server {
- #... commond definitions such as server, root
- location / {
- error_page 418 = @queryone;
- error_page 419 = @querytwo;
- error_page 420 = @querythree;
- if ( $query_string = "service=git-receive-pack" ) { return 418; }
- if ( $args = "service=git-send-pack" ) { return 419; }
- if ( $arg_somerandomfield = "somerandomvaluetomatch" ) { return 420; }
- # do the remaining stuff
- # ex: try_files $uri =404;
- }
- location @queryone {
- # do stuff when queryone matches
- }
- location @querytwo {
- # do stuff when querytwo matches
- }
- location @querythree {
- # do stuff when querythree matches
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement