Test new flag httpOnly in config

This commit is contained in:
Jean Froment 2022-03-06 20:59:53 +01:00
parent 75edd0940d
commit 130bee09a8
2 changed files with 11 additions and 5 deletions

View File

@ -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

View File

@ -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: