Skip to content

Instantly share code, notes, and snippets.

@F1nny

F1nny/try.patch Secret

Created March 7, 2022 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save F1nny/524ac68336623d46c375b9ed9d79e38f to your computer and use it in GitHub Desktop.
Save F1nny/524ac68336623d46c375b9ed9d79e38f to your computer and use it in GitHub Desktop.
mailspring origin header tweak
diff --git a/app/internal_packages/onboarding/lib/onboarding-helpers.ts b/app/internal_packages/onboarding/lib/onboarding-helpers.ts
index a83680a21..cc6c6fe8f 100644
--- a/app/internal_packages/onboarding/lib/onboarding-helpers.ts
+++ b/app/internal_packages/onboarding/lib/onboarding-helpers.ts
@@ -88,6 +88,7 @@ async function fetchPostWithFormBody<T>(url: string, body: { [key: string]: stri
.join('&'),
headers: {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
+ 'Origin': 'localhost',
},
});
const json = ((await resp.json()) || {}) as T;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment