54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
# PyServe configuration for serving documentation
|
|
# Usage: pyserve -c config.docs.yaml
|
|
|
|
http:
|
|
static_dir: .
|
|
|
|
server:
|
|
host: 0.0.0.0
|
|
port: 80
|
|
backlog: 1000
|
|
default_root: false
|
|
|
|
ssl:
|
|
enabled: false
|
|
|
|
logging:
|
|
level: INFO
|
|
console_output: true
|
|
|
|
extensions:
|
|
- type: routing
|
|
config:
|
|
regex_locations:
|
|
"=/api/version":
|
|
proxy_pass: "https://git.pyserve.org/api/v1/repos/Shifty/pyserveX/releases/latest"
|
|
headers:
|
|
- "X-Forwarded-For: $remote_addr"
|
|
- "X-Real-IP: $remote_addr"
|
|
|
|
"=/api/blog/posts":
|
|
proxy_pass: "https://git.pyserve.org/api/v1/repos/Shifty/docs.pyserve.org/releases"
|
|
headers:
|
|
- "X-Forwarded-For: $remote_addr"
|
|
- "X-Real-IP: $remote_addr"
|
|
|
|
"~^/api/blog/post/(?P<tag>.+)$":
|
|
proxy_pass: "https://git.pyserve.org/api/v1/repos/Shifty/docs.pyserve.org/releases/tags/{tag}"
|
|
headers:
|
|
- "X-Forwarded-For: $remote_addr"
|
|
- "X-Real-IP: $remote_addr"
|
|
|
|
"~*\\.(css)$":
|
|
root: "./docs"
|
|
cache_control: "public, max-age=3600"
|
|
|
|
"~*\\.(js)$":
|
|
root: "./docs"
|
|
cache_control: "public, max-age=1800"
|
|
|
|
"__default__":
|
|
root: "./docs"
|
|
index_file: "index.html"
|
|
cache_control: "no-cache"
|