From 03444f09600f573039c6896decd6120a2c3c56d7 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 14 Dec 2023 16:41:11 -0300 Subject: [PATCH] feat: support cors origin --- Dockerfile | 1 + pocketbased.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3bf496e..e84daf1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ ARG BASE_IMAGE=gitea.nulo.in/sutty/monit FROM ${BASE_IMAGE}:${ALPINE_VERSION} MAINTAINER "nulo " ENV POCKETBASE_SECRET 11111111111111111111111111111111 +ENV POCKETBASE_ORIGINS "" RUN apk add --no-cache pocketbase daemonize COPY ./pocketbased.sh /usr/local/bin/pocketbased diff --git a/pocketbased.sh b/pocketbased.sh index aef9fe2..88f5e06 100755 --- a/pocketbased.sh +++ b/pocketbased.sh @@ -20,6 +20,7 @@ case $1 in --migrationsDir /srv/pocketbase/migrations \ --publicDir /srv/pocketbase/public \ --hooksDir /srv/pocketbase/hooks \ - --encryptionEnv POCKETBASE_SECRET + --encryptionEnv POCKETBASE_SECRET \ + --origins "${POCKETBASE_ORIGINS:-*}" ;; esac