From 238667cff3c70fdc30d7b94985a39dc078a5db6b Mon Sep 17 00:00:00 2001 From: Jono Date: Fri, 8 Mar 2024 17:55:16 -0800 Subject: [PATCH 1/2] GAE Flexible Environment > 18 Requires Runtime Config --- app.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.yaml b/app.yaml index 47d68ce621..0c2077d199 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,10 @@ runtime: nodejs env: flex +runtime_config: + operating_system: "ubuntu22" + runtime_version: "18" + env_variables: # --REQUIRED-- DATABASE_URI: mongodb://localhost:27017/dev From 8582c26149197ce9f2242c975df61b825362b7fc Mon Sep 17 00:00:00 2001 From: Jono Date: Fri, 8 Mar 2024 17:57:16 -0800 Subject: [PATCH 2/2] Trust proxy for GAE https forwarding --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 2baf852c93..c4c973f5f3 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,8 @@ export const config = { export const app = express(); +app.set('trust proxy', true); + // Serve static assets from the /public folder app.use('/public', express.static(path.join(__dirname, '/public')));