Newer
Older
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
map $http_user_agent $outdated {
default 0;
"~MSIE [1-10]\." 1;
"~Trident/[5-7]\." 1;
"~Mozilla.*Firefox/[1-9]\." 1;
"~Mozilla.*Firefox/[0-2][0-9]\." 1;
"~Mozilla.*Firefox/3[0-1]\." 1;
"~Opera.*Version/[0-9]\." 1;
"~Opera.*Version/[0-1][0-9]\." 1;
"~Opera.*Version/2[0-1]\." 1;
"~AppleWebKit.*Version/[0-6]\..*Safari" 1;
"~Chrome/[0-9]\." 1;
"~Chrome/[0-2][0-9]\." 1;
"~Chrome/3[0-3]\." 1;
}
server {
listen 8080 default_server;
root /usr/share/nginx/html/;
location / {
# Redirect outdated nav
if ($outdated = 1){
rewrite ^ /outdated.html break;
}
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# Angular routed apps must fall back to index.html ( https://angular.io/guide/deployment#server-configuration )
try_files $uri $uri/ /index.html;
}
location /api {
proxy_pass http://host.docker.internal:3000;
}
location /base-adresse/base-adresse-nationale/streets {
proxy_pass https://passerelle.formulaireextranet.grandlyon.com/base-adresse/base-adresse-nationale/streets;
}
location /geocoding/photon/api {
proxy_pass https://download.data.grandlyon.com/geocoding/photon/api;
}
location /reverse {
proxy_pass https://api-adresse.data.gouv.fr/reverse;
}
location /wfs/grandlyon {
proxy_pass https://download.data.grandlyon.com/wfs/grandlyon;
}
location ~* (/ghost) {
expires epoch;
proxy_no_cache 1;
proxy_pass http://host.docker.internal:2368;
}
# REALLY important for JavaScript modules (type="module") to work as expected!!!
location ~ \.js {
add_header Content-Type text/javascript;
}
}