-
Notifications
You must be signed in to change notification settings - Fork 7
/
Caddyfile
69 lines (59 loc) · 1.6 KB
/
Caddyfile
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
66
67
68
69
:80, :443 {
# TODO: serve web files
root * /app
@api {
path /api/* /swagger/*
}
@oss {
path /file/*
}
@not_api {
not {
path /api/* /swagger/* /file/*
}
}
@api_options {
path /api/*
method OPTIONS
}
handle @oss {
uri strip_prefix /file
reverse_proxy {
to minio-oss:9000
}
header {
Location ^ /file
defer
}
}
handle @api_options {
respond 204
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Methods GET,POST,PATCH,PUT,DELETE,OPTIONS
Access-Control-Allow-Headers DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization
Access-Control-Expose-Headers Content-Length,Content-Range
Access-Control-Max-Age 1728000
Content-Type text/plain; charset=utf-8
Content-Length 0
X-StmChat-Options TRUE
defer
}
}
handle @api {
reverse_proxy {
to coordinator:80
}
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Methods GET,POST,PATCH,PUT,DELETE,OPTIONS
Access-Control-Allow-Headers DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range
Access-Control-Expose-Headers Content-Length,Content-Range
defer
}
}
handle {
try_files {path} {path}.html {path}.htm index.html index.htm
file_server
}
}