Created
March 5, 2013 21:42
-
-
Save tlack/5094559 to your computer and use it in GitHub Desktop.
example of proxying https -> http
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { # ~ domain=(.*)& { | |
rewrite_log on; | |
if ( $arg_callback ) { | |
echo_before_body '$arg_callback('; | |
echo_after_body ');'; | |
} | |
if ($args ~ "domain=(.*)&") { | |
set $key1 $1; | |
echo_before_body "$arg_callback("; | |
# proxy_pass http://whois.api.go.co/blah=$key1; | |
proxy_pass "http://xml.domainsbot.com/XMLServices/FirstImpact3Plain.aspx?format=json&method=SearchAvailableDomains&limi | |
echo_after_body ")"; | |
} | |
#proxy_pass http://whois.api.go.co; | |
#rewrite "^.*domain=(.*)&.*$" /XMLServices/FirstImpact3Plain.aspx?format=json&method=SearchAvailableDomains&limit=8&tlds= | |
#break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment