Add caddy config
This commit is contained in:
parent
d6ab257473
commit
815770303c
23
caddy/Caddyfile
Normal file
23
caddy/Caddyfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Snippets
|
||||||
|
import log.caddy
|
||||||
|
import security.caddy
|
||||||
|
|
||||||
|
www.simplenotes.be {
|
||||||
|
redir * https://simplenotes.be{path}
|
||||||
|
}
|
||||||
|
|
||||||
|
simplenotes.be {
|
||||||
|
import log simplenotes.be
|
||||||
|
import strict-transport
|
||||||
|
header -Server
|
||||||
|
|
||||||
|
reverse_proxy http://localhost:8080
|
||||||
|
}
|
||||||
|
|
||||||
|
dev.simplenotes.be {
|
||||||
|
import log dev.simplenotes.be
|
||||||
|
import strict-transport
|
||||||
|
header -Server
|
||||||
|
|
||||||
|
reverse_proxy http://localhost:8081
|
||||||
|
}
|
||||||
8
caddy/log.caddy
Normal file
8
caddy/log.caddy
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
(log) {
|
||||||
|
log {
|
||||||
|
output file /var/log/www/{args.0}.json
|
||||||
|
format json
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: set ft=caddyfile:
|
||||||
5
caddy/security.caddy
Normal file
5
caddy/security.caddy
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
(strict-transport) {
|
||||||
|
header Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: set ft=caddyfile:
|
||||||
Loading…
x
Reference in New Issue
Block a user