-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ba2b37
commit 6c058c6
Showing
20 changed files
with
106 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
context/runtime/magnetar/system/config/caddy/conf.d/cache.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cache { | ||
log_level "{args[0]}" | ||
|
||
cache_keys { | ||
disable_body | ||
} | ||
|
||
key { | ||
disable_body | ||
} | ||
|
||
stale 31536000s | ||
ttl 31536000s | ||
|
||
nuts { | ||
configuration { | ||
Dir "{args[1]}" | ||
EntryIdxMode 1 | ||
RWMode 0 | ||
SegmentSize 1024 | ||
NodeNum 42 | ||
SyncEnable true | ||
StartFileLoadingMode 1 | ||
} | ||
} | ||
} | ||
|
23 changes: 23 additions & 0 deletions
23
context/runtime/magnetar/system/config/caddy/conf.d/global.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
https_port {args[0]} | ||
http_port {args[1]} | ||
default_sni {args[2]} | ||
admin off | ||
storage file_system { | ||
root "{$XDG_DATA_HOME}"/certs | ||
} | ||
skip_install_trust | ||
auto_https {args[3]} | ||
order basicauth after request_header | ||
order replace after encode | ||
order cache before rewrite | ||
|
||
acme_ca {args[4]} | ||
|
||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/log.conf {args[5]} | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/cache.conf "warn" "{$XDG_CACHE_HOME}/caddy" | ||
|
||
servers { | ||
metrics | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/global.conf "{$CDY_PORT_HTTPS}" "{$CDY_PORT_HTTP}" "{$CDY_DOMAIN}" "{$CDY_TLS_AUTO}" "{$CDY_ACME_CA}" "{$CDY_LOG_LEVEL}" | ||
import "{$XDG_CONFIG_DIRS}"/caddy/sites.d/*.conf | ||
import "{$XDG_CONFIG_HOME}"/caddy/sites.d/*.conf |
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
context/runtime/magnetar/system/config/caddy/sites.d/main.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{$CDY_SCHEME}://{$CDY_DOMAIN} {$CDY_ADDITIONAL_DOMAINS} { | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/log.conf "{$CDY_LOG_LEVEL}" | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/headers.conf "{$CDY_SERVER_NAME}" | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/proxyauth.conf | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/tls*{$CDY_TLS_DISABLE}.conf "{$CDY_TLS_MODE}" "{$CDY_TLS_MIN}" | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/mtls*{$CDY_MTLS_DISABLE}.conf "{$CDY_TLS_MODE}" "{$CDY_MTLS_MODE}" "{$CDY_MTLS_TRUST}" | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/auth*{$CDY_AUTH_DISABLE}.conf "{$CDY_AUTH_REALM}" "{$CDY_AUTH_USERNAME}" "{$CDY_AUTH_PASSWORD}" | ||
|
||
metrics /metrics | ||
|
||
rewrite / /display | ||
replace "ws://" "wss://" | ||
replace "http://" "https://" | ||
|
||
# Pass it down | ||
reverse_proxy http://127.0.0.1:9100 { | ||
import "{$XDG_CONFIG_DIRS}"/caddy/conf.d/proxy_headers.conf | ||
# CSP specifics to this backend service | ||
header_down Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline'; style-src-elem 'self' https://fonts.googleapis.com 'unsafe-inline'; img-src 'self' blob:; font-src 'self' https://fonts.gstatic.com" | ||
} | ||
} |