Skip to content

Instantly share code, notes, and snippets.

@wburgers
Last active June 24, 2016 20:57
Show Gist options
  • Save wburgers/a283fd3eca76a5d1f727b1d0ffc04133 to your computer and use it in GitHub Desktop.
Save wburgers/a283fd3eca76a5d1f727b1d0ffc04133 to your computer and use it in GitHub Desktop.
Een simpele server side proxy voor de ns-api (alleen nginx nodig)
location /nsapi/ {
allow 192.168.0.1/24; #proxy alleen beschikbaar voor je interne netwerk.
deny all;
proxy_pass https://webservices.ns.nl/;
proxy_set_header Authorization "Basic <base64encoded gebruikersnaam:wachtwoord hier>";
add_header Access-Control-Allow-Origin $http_origin;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment