docs.pyserve.org/config.docs.yaml
Илья Глазунов 58660ec8d4
All checks were successful
Deploy to Production / deploy (push) Successful in 6s
updated documentation
2025-12-08 01:01:45 +03:00

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"