From 6f56b6b9def0fd9e5fd6f49b0e733dbed8160fb1 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Wed, 3 Aug 2022 18:25:20 +0200 Subject: [PATCH 1/4] Add PATCH and HEAD to the Access-Control-Allow-Methods Signed-off-by: Vincenzo Scamporlino --- app-config.yaml | 2 +- packages/create-app/templates/default-app/app-config.yaml.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app-config.yaml b/app-config.yaml index cb865a52b9..32b53da236 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -39,7 +39,7 @@ backend: store: memory cors: origin: http://localhost:3000 - methods: [GET, POST, PUT, DELETE] + methods: [GET, HEAD, PATCH, POST, PUT, DELETE] credentials: true csp: connect-src: ["'self'", 'http:', 'https:'] diff --git a/packages/create-app/templates/default-app/app-config.yaml.hbs b/packages/create-app/templates/default-app/app-config.yaml.hbs index cd6998de69..9c31ccf381 100644 --- a/packages/create-app/templates/default-app/app-config.yaml.hbs +++ b/packages/create-app/templates/default-app/app-config.yaml.hbs @@ -24,7 +24,7 @@ backend: # Default Helmet Content-Security-Policy values can be removed by setting the key to false cors: origin: http://localhost:3000 - methods: [GET, POST, PUT, DELETE] + methods: [GET, HEAD, PATCH, POST, PUT, DELETE] credentials: true # This is for local developement only, it is not recommended to use this in production # The production database configuration is stored in app-config.production.yaml From 0174a0a022f834a790abca27656ec3d4c2a10af6 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Wed, 3 Aug 2022 22:52:14 +0200 Subject: [PATCH 2/4] Add changeset Signed-off-by: Vincenzo Scamporlino --- .changeset/wicked-knives-wink.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wicked-knives-wink.md diff --git a/.changeset/wicked-knives-wink.md b/.changeset/wicked-knives-wink.md new file mode 100644 index 0000000000..070e7709a9 --- /dev/null +++ b/.changeset/wicked-knives-wink.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Add `PATCH` and `HEAD` to the `Access-Control-Allow-Methods`. From 9dd717cbc598b2802b8898efc2830b59e12f2c98 Mon Sep 17 00:00:00 2001 From: Ben Lambert Date: Thu, 4 Aug 2022 10:50:36 +0200 Subject: [PATCH 3/4] Add a nice description on how to apply the change Signed-off-by: Ben Lambert Signed-off-by: Ben Lambert --- .changeset/wicked-knives-wink.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.changeset/wicked-knives-wink.md b/.changeset/wicked-knives-wink.md index 070e7709a9..b238be331b 100644 --- a/.changeset/wicked-knives-wink.md +++ b/.changeset/wicked-knives-wink.md @@ -3,3 +3,13 @@ --- Add `PATCH` and `HEAD` to the `Access-Control-Allow-Methods`. + + +To apply this change to your Backstage installation make the following change to your `app-config.yaml` + +```diff + cors: + origin: http://localhost:3000 +- methods: [GET, POST, PUT, DELETE] ++ methods: [GET, POST, PUT, DELETE, PATCH, HEAD] +``` From 6b68883776dec11cde785455995b424a57516c0b Mon Sep 17 00:00:00 2001 From: blam Date: Thu, 4 Aug 2022 11:02:04 +0200 Subject: [PATCH 4/4] chore: make pretty Signed-off-by: blam --- .changeset/wicked-knives-wink.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.changeset/wicked-knives-wink.md b/.changeset/wicked-knives-wink.md index b238be331b..e0f3e485c0 100644 --- a/.changeset/wicked-knives-wink.md +++ b/.changeset/wicked-knives-wink.md @@ -4,7 +4,6 @@ Add `PATCH` and `HEAD` to the `Access-Control-Allow-Methods`. - To apply this change to your Backstage installation make the following change to your `app-config.yaml` ```diff