-
Notifications
You must be signed in to change notification settings - Fork 4
/
tpl02-baseBreak-noQuery.mustache
44 lines (35 loc) · 1.07 KB
/
tpl02-baseBreak-noQuery.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#
# Homepage and endpoints of the API "{{title}}".
#
server {
server_name {{host}};
root /var/www/{{host}}/html;
# publishing by default the HTML for API description and related files for navigation
index index.html index.htm;
location / {
try_files $uri $uri/ @proxy;
}
location @proxy {
# # # # # # # # # #
#### special endpoints
{{#each rewrites}}
{{#rewrite_regex}}
rewrite # endpoint "{{../notes}}" for {{../lst}}
{{{../rewrite_regex}}}
{{{../rewrite_url}}}
break;
{{/rewrite_regex}}
{{^rewrite_regex}}
# endpoint {{notes}} for {{lst}}
{{/rewrite_regex}}
{{/each}}
proxy_pass {{proxy_pass}}; # my PostREST is here!
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
default_type {{{produces}}};
proxy_hide_header Content-Location;
proxy_set_header Connection "";
proxy_http_version 1.1;
}
}