diff --git a/.github/workflows/release-docker-github.yml b/.github/workflows/release-docker-github.yml index d3ab74097b..3183776ede 100644 --- a/.github/workflows/release-docker-github.yml +++ b/.github/workflows/release-docker-github.yml @@ -27,6 +27,16 @@ jobs: id-token: write steps: + - name: Generate Random NEXTAUTH_SECRET + run: | + SECRET=$(openssl rand -hex 32) + echo "NEXTAUTH_SECRET=$SECRET" >> $GITHUB_ENV + + - name: Generate Random ENCRYPTION_KEY + run: | + SECRET=$(openssl rand -hex 32) + echo "ENCRYPTION_KEY=$SECRET" >> $GITHUB_ENV + - name: Checkout repository uses: actions/checkout@v3 diff --git a/apps/web/next.config.mjs b/apps/web/next.config.mjs index b5cbb5122f..c818f6873e 100644 --- a/apps/web/next.config.mjs +++ b/apps/web/next.config.mjs @@ -8,9 +8,7 @@ const nextConfig = { assetPrefix: process.env.ASSET_PREFIX_URL || undefined, output: "standalone", experimental: { - serverActions: { - allowedOrigins: [process.env.WEBAPP_URL.replace(/https?:\/\//, "")], - }, + serverActions: true, }, transpilePackages: ["@formbricks/database", "@formbricks/ee", "@formbricks/ui", "@formbricks/lib"], images: { @@ -104,6 +102,13 @@ const nextConfig = { }, }; +// set actions allowed origins +if (process.env.WEBAPP_URL) { + nextConfig.experimental.serverActions = { + allowedOrigins: [process.env.WEBAPP_URL.replace(/https?:\/\//, "")], + }; +} + const sentryOptions = { // For all available options, see: // https://github.com/getsentry/sentry-webpack-plugin#options