Fix trusted host
This commit is contained in:
parent
a6bdb76dc7
commit
3a61d684a1
3 changed files with 12 additions and 4 deletions
5
.github/workflows/deploy.yml
vendored
5
.github/workflows/deploy.yml
vendored
|
|
@ -44,6 +44,7 @@ jobs:
|
||||||
project: ${{ steps.meta.outputs.project }}
|
project: ${{ steps.meta.outputs.project }}
|
||||||
namespace: ${{ steps.meta.outputs.namespace }}
|
namespace: ${{ steps.meta.outputs.namespace }}
|
||||||
storage_name: ${{ steps.meta.outputs.storage_name }}
|
storage_name: ${{ steps.meta.outputs.storage_name }}
|
||||||
|
trusted_host: ${{ steps.meta.outputs.trusted_host }}
|
||||||
steps:
|
steps:
|
||||||
- name: Generate metadata
|
- name: Generate metadata
|
||||||
id: meta
|
id: meta
|
||||||
|
|
@ -55,6 +56,9 @@ jobs:
|
||||||
ENVIRONMENT=prod
|
ENVIRONMENT=prod
|
||||||
IMAGE_TAG=${{ github.ref_name }}
|
IMAGE_TAG=${{ github.ref_name }}
|
||||||
RELEASE_NAME=prod
|
RELEASE_NAME=prod
|
||||||
|
TRUSTED_HOST=$(echo ${{ vars.DOMAIN }} | sed 's/\./\\\\\\\\./g')
|
||||||
|
|
||||||
|
echo "trusted_host=${TRUSTED_HOST}" >> $GITHUB_OUTPUT
|
||||||
echo "context=${CONTEXT}" >> $GITHUB_OUTPUT
|
echo "context=${CONTEXT}" >> $GITHUB_OUTPUT
|
||||||
echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT
|
echo "environment=${ENVIRONMENT}" >> $GITHUB_OUTPUT
|
||||||
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
||||||
|
|
@ -129,6 +133,7 @@ jobs:
|
||||||
--set=php.storage.usePathStyleEndpoint=true \
|
--set=php.storage.usePathStyleEndpoint=true \
|
||||||
--set=php.storage.key="${{ secrets.storage-key }}" \
|
--set=php.storage.key="${{ secrets.storage-key }}" \
|
||||||
--set=php.storage.secret="${{ secrets.storage-secret-key }}" \
|
--set=php.storage.secret="${{ secrets.storage-secret-key }}" \
|
||||||
|
--set=php.trustedHosts[2]=${{ needs.meta.outputs.trusted_host }} \
|
||||||
--values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \
|
--values ./helm/chart/values-${{ needs.meta.outputs.context }}.yml \
|
||||||
| sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then
|
| sed --unbuffered '/USER-SUPPLIED VALUES/,$d' ; then
|
||||||
echo "Deployment has failed!"
|
echo "Deployment has failed!"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ data:
|
||||||
php-app-env: {{ .Values.php.appEnv | quote }}
|
php-app-env: {{ .Values.php.appEnv | quote }}
|
||||||
php-app-debug: {{ .Values.php.appDebug | quote }}
|
php-app-debug: {{ .Values.php.appDebug | quote }}
|
||||||
php-cors-allow-origin: {{ .Values.php.corsAllowOrigin | quote }}
|
php-cors-allow-origin: {{ .Values.php.corsAllowOrigin | quote }}
|
||||||
php-trusted-hosts: {{ .Values.php.trustedHosts | quote }}
|
php-trusted-hosts: {{ join "|" .Values.php.trustedHosts | quote }}
|
||||||
php-trusted-proxies: "{{ join "," .Values.php.trustedProxies }}"
|
php-trusted-proxies: "{{ join "," .Values.php.trustedProxies }}"
|
||||||
mercure-url: "http://{{ include "plateforme-ebs" . }}/.well-known/mercure"
|
mercure-url: "http://{{ include "plateforme-ebs" . }}/.well-known/mercure"
|
||||||
mercure-public-url: {{ .Values.mercure.publicUrl | default "http://127.0.0.1/.well-known/mercure" | quote }}
|
mercure-public-url: {{ .Values.mercure.publicUrl | default "http://127.0.0.1/.well-known/mercure" | quote }}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
php:
|
php:
|
||||||
image:
|
image:
|
||||||
repository: "ghcr.io/apes-hdf/plateforme-ebs-php" # CHANGE ME
|
repository: "ghcr.io/tipimi-fr/plateforme-ebs-php" # CHANGE ME
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: ""
|
tag: ""
|
||||||
|
|
@ -12,7 +12,10 @@ php:
|
||||||
appDebug: "0"
|
appDebug: "0"
|
||||||
appSecret: ""
|
appSecret: ""
|
||||||
corsAllowOrigin: "^https?://.*?\\.chart-example\\.local$"
|
corsAllowOrigin: "^https?://.*?\\.chart-example\\.local$"
|
||||||
trustedHosts: "^127\\.0\\.0\\.1|localhost|.*\\.chart-example\\.local$"
|
trustedHosts:
|
||||||
|
- "^127\\.0\\.0\\.1"
|
||||||
|
- "localhost"
|
||||||
|
- ".*\\.chart-example\\.local$"
|
||||||
trustedProxies:
|
trustedProxies:
|
||||||
- "127.0.0.1"
|
- "127.0.0.1"
|
||||||
- "10.0.0.0/8"
|
- "10.0.0.0/8"
|
||||||
|
|
@ -54,7 +57,7 @@ consumer:
|
||||||
|
|
||||||
caddy:
|
caddy:
|
||||||
image:
|
image:
|
||||||
repository: "ghcr.io/apes-hdf/plateforme-ebs-caddy" # CHANGE ME
|
repository: "ghcr.io/tipimi-fr/plateforme-ebs-caddy" # CHANGE ME
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
# Overrides the image tag whose default is the chart appVersion.
|
# Overrides the image tag whose default is the chart appVersion.
|
||||||
tag: ""
|
tag: ""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue