-
Notifications
You must be signed in to change notification settings - Fork 2
/
Caddyfile
68 lines (55 loc) · 1.23 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
localhost {
# Define named matchers satisfying a combination of content request specs
@rdf {
conneg {
match_types application/rdf+xml application/x-turtle
force_type_query_string format
}
}
@rdfFr {
conneg {
match_types application/rdf+xml application/x-turtle
force_type_query_string format
match_languages fr
force_language_query_string lang
}
}
@rdfDeEn {
conneg {
match_types application/rdf+xml application/x-turtle
force_type_query_string format
match_languages de en
force_language_query_string lang
var_language lang
}
}
@htmlBrotli {
conneg {
match_types text/html
force_type_query_string format
match_encodings br brotli
force_encoding_query_string enc
}
}
@html {
conneg {
match_types text/html
force_type_query_string format
}
}
# Test with the following:
respond @rdfFr "RDF en français!
"
respond @rdfDeEn "RDF auf deutsch oder englisch, {vars.conneg_lang} preferred!
"
respond @rdf "RDF!
"
respond @htmlBrotli "HTML, but brotli-compressed!
"
respond @html "HTML
"
respond "Default
"
# If it's working, use like so:
# reverse_proxy @rdf localhost:8080
}