-
Notifications
You must be signed in to change notification settings - Fork 3
/
nginx.conf
22 lines (22 loc) · 837 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
server {
listen 80 default_server;
server_name geosearch.planninglabs.nyc;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host labs-geosearch-docs.netlify.app;
proxy_pass https://labs-geosearch-docs.netlify.app;
}
location /v1 {
default_type application/json;
return 410 '{"message": "v1 API has been permanently removed. For details on migrating to the v2 API, see https://github.com/NYCPlanning/labs-geosearch-docker/blob/master/MIGRATING.md"}';
}
location /v2 {
if ($request_method != GET) {
return 403;
}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
# point to the Pelias API
proxy_pass http://api:4000/v1;
}
}