Skip to content

Instantly share code, notes, and snippets.

@tlack
Created March 5, 2013 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tlack/5094559 to your computer and use it in GitHub Desktop.
Save tlack/5094559 to your computer and use it in GitHub Desktop.
example of proxying https -> http
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