UNPKG

hiproxy

Version:

hiproxy - lightweight and powerful proxy tool for front-end developer based on Node.js.

42 lines (33 loc) 891 B
## global variables # set $domain api.hiproxy.org; # set $local 127.0.0.1:8800; ## simple rewrite rule # http://api.hiproxy.org => http://hiproxy.org/api/; ## standard rewrite url # domain hiproxy.org { # set_header Access-Control-Allow-Origin *; ## Normal location # location /api/order/detail { # proxy_pass http://$local/user/?domain=$domain; # set_header Set-Cookie userID 200908204140; #} ## RegExp location # location ~ /(usercenter|userinfo)/ { # proxy_pass http://127.0.0.1:3008/info/; # } ## Static files # location /static_file/ { # alias ./src/view/; # root app.html; # } ## echo directive # location /echo { # echo <h1>hello_echo</h1>; # echo <p>test echo directive</p>; # echo <p>finish</p>; # } ## send static file # location /file { # send_file ./public/$query_string; # } # }