-
-
Notifications
You must be signed in to change notification settings - Fork 375
/
caddyfile.expected
251 lines (251 loc) · 9.54 KB
/
caddyfile.expected
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
[
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"debug"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"admin"},
{"type":"Text","value":" "},
{"type":"NameConstant","value":"off"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"on_demand_tls"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"ask"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"https://example.com"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n"},
{"type":"NameVariableAnonymous","value":"(blocking)"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":" \n\t"},
{"type":"NameDecorator","value":"@blocked"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.txt"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.md"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.mdown"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/site/*"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"redir"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@blocked"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n"},
{"type":"GenericHeading","value":"example.com"},
{"type":"Text","value":", "},
{"type":"GenericHeading","value":"fake.org"},
{"type":"Text","value":", "},
{"type":"LiteralStringEscape","value":"{$ENV_SITE}"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"root"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"*"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/srv"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"respond"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"/get-env"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{$ENV_VAR}"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"tls"},
{"type":"Text","value":" "},
{"type":"NameConstant","value":"off"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"route"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"CommentSingle","value":"\n\t\t# Add trailing slash for directory requests\n"},
{"type":"Text","value":"\t\t"},
{"type":"NameDecorator","value":"@canonicalPath"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"file"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"try_files"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"LiteralString","value":"/index.php"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"not"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*/"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"redir"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@canonicalPath"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"LiteralString","value":"/"},
{"type":"Text","value":" "},
{"type":"LiteralNumberInteger","value":"308"},
{"type":"CommentSingle","value":"\n\n\t\t# If the requested file does not exist, try index files\n"},
{"type":"Text","value":"\t\t"},
{"type":"NameDecorator","value":"@indexFiles"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"file"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"try_files"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{path}"},
{"type":"LiteralString","value":"/index.php"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"index.php"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"split_path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":".php"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"rewrite"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@indexFiles"},
{"type":"Text","value":" "},
{"type":"LiteralStringEscape","value":"{http.matchers.file.relative}"},
{"type":"CommentSingle","value":"\n\n\t\t# Proxy PHP files to the FastCGI responder\n"},
{"type":"Text","value":"\t\t"},
{"type":"NameDecorator","value":"@phpFiles"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.php"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"reverse_proxy"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@phpFiles"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"unix//var/run/php7.4-fpm.sock"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Keyword","value":"transport"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"fastcgi"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t\t\t"},
{"type":"Keyword","value":"split"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":".php"},
{"type":"Text","value":"\n\t\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n\t"},
{"type":"NameDecorator","value":"@encode_exts"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.html"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.js"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.css"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"*.svg"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"header"},
{"type":"Text","value":" "},
{"type":"Punctuation","value":"{"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-Content-Type-Options"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"nosniff"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-XSS-Protection"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\"1;"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"mode=block\""},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-Robots-Tag"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"none"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"Content-Security-Policy"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\"frame-ancestors"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"'self'\""},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"X-Frame-Options"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"DENY"},
{"type":"Text","value":"\n\t\t"},
{"type":"Keyword","value":"Referrer-Policy"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"same-origin"},
{"type":"Text","value":"\n\t"},
{"type":"Punctuation","value":"}"},
{"type":"Text","value":"\n\n\t"},
{"type":"NameDecorator","value":"@singleLine"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"not"},
{"type":"Text","value":" "},
{"type":"Keyword","value":"path"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"/matcher"},
{"type":"Text","value":"\n\t"},
{"type":"Keyword","value":"respond"},
{"type":"Text","value":" "},
{"type":"NameDecorator","value":"@singleLine"},
{"type":"Text","value":" "},
{"type":"LiteralString","value":"\"Awesome.\""},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"import"},
{"type":"Text","value":" "},
{"type":"NameVariableMagic","value":"blocking"},
{"type":"Text","value":"\n\n\t"},
{"type":"Keyword","value":"file_server"},
{"type":"Text","value":"\n"},
{"type":"Punctuation","value":"}"}
]