Skip to content

Instantly share code, notes, and snippets.

@staticfilestorage
Created September 22, 2019 11:35
Show Gist options
  • Select an option

  • Save staticfilestorage/bed2692be89d9ab0a0216d7f865fdc8f to your computer and use it in GitHub Desktop.

Select an option

Save staticfilestorage/bed2692be89d9ab0a0216d7f865fdc8f to your computer and use it in GitHub Desktop.
location /get/
{
set $hostx "";
set $addrs "";
if ( $uri ~ "^/get/http./+([^/]+)/(.+)$") {
set $hostx $1;
set $addrs $2;
}
resolver 127.0.0.1;
proxy_pass http://$hostx/$addrs;
proxy_set_header referer "http://$hostx";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment