From 130bee09a8e5a90667f0d5e4be3dcac71dad79e1 Mon Sep 17 00:00:00 2001 From: Jean Froment Date: Sun, 6 Mar 2022 20:59:53 +0100 Subject: [PATCH] Test new flag httpOnly in config --- run-seedbox.sh | 6 ++++++ traefik/traefik.yaml | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/run-seedbox.sh b/run-seedbox.sh index 4d53565..f2c6947 100755 --- a/run-seedbox.sh +++ b/run-seedbox.sh @@ -228,11 +228,17 @@ for json in $(yq eval -o json config.yaml | jq -c ".services[]"); do echo "http.routers.${ruleId}.service: ${ruleId}" >> rules.props fi + # TODO: leave it or remove it? disableCertificateGeneration=$(echo $rule | jq -r .disableCertificateGeneration) if [[ ${disableCertificateGeneration} == true ]]; then echo "http.routers.${ruleId}.tls: EMPTYMAP" >> rules.props fi + httpOnly=$(echo $rule | jq -r .httpOnly) + if [[ ${httpOnly} == true ]]; then + echo "http.routers.${ruleId}.entryPoints.0: insecure" >> rules.props + fi + # If the specified service does not contain a "@" => we create it # If the service has a @, it means it is defined elsewhere so we do not create it (custom file, @internal...) if echo ${traefikService} | grep -vq "@"; then diff --git a/traefik/traefik.yaml b/traefik/traefik.yaml index 1f28c6d..91d7823 100644 --- a/traefik/traefik.yaml +++ b/traefik/traefik.yaml @@ -19,11 +19,11 @@ providers: entryPoints: insecure: address: ":80" - http: - redirections: - entryPoint: - to: secure - scheme: https + # http: + # redirections: + # entryPoint: + # to: secure + # scheme: https secure: address: ":443" http: