|
0
|
1 |
(cors) {
|
|
|
2 |
@cors_preflight{args.0} method OPTIONS
|
|
|
3 |
@cors{args.0} header Origin {args.0}
|
|
|
4 |
|
|
|
5 |
handle @cors_preflight{args.0} {
|
|
|
6 |
header {
|
|
|
7 |
Access-Control-Allow-Origin "{args.0}"
|
|
|
8 |
Access-Control-Allow-Methods "GET, POST, PUT, PATCH, DELETE, OPTIONS"
|
|
|
9 |
Access-Control-Allow-Headers *
|
|
|
10 |
Access-Control-Max-Age "3600"
|
|
|
11 |
defer
|
|
|
12 |
}
|
|
|
13 |
respond "" 204
|
|
|
14 |
}
|
|
|
15 |
|
|
|
16 |
handle @cors{args.0} {
|
|
|
17 |
header {
|
|
|
18 |
Access-Control-Allow-Origin "{args.0}"
|
|
|
19 |
Access-Control-Expose-Headers *
|
|
|
20 |
defer
|
|
|
21 |
}
|
|
|
22 |
}
|
|
|
23 |
}
|
|
|
24 |
|
|
|
25 |
ldt.iri.centrepompidou.fr {
|
|
|
26 |
tls internal
|
|
|
27 |
|
|
|
28 |
redir / /ldtplatform/
|
|
|
29 |
rewrite /ldtplatform /ldtplatform/
|
|
|
30 |
redir /ldt /ldtplatform/ldt/
|
|
|
31 |
redir /ldt/ /ldtplatform/ldt/
|
|
|
32 |
|
|
|
33 |
handle_path /static/* {
|
|
|
34 |
root * /static
|
|
|
35 |
file_server
|
|
|
36 |
import cors *
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
handle_path /ldtplatform/* {
|
|
|
40 |
reverse_proxy server:8000 {
|
|
|
41 |
transport uwsgi {
|
|
|
42 |
uwsgi_param SCRIPT_NAME /ldtplatform
|
|
|
43 |
uwsgi_param UWSGI_SCHEME https
|
|
|
44 |
}
|
|
|
45 |
}
|
|
|
46 |
import cors *
|
|
|
47 |
}
|
|
|
48 |
} |