Skip to content

Commit 18ca7ce

Browse files
authored
Merge pull request #239 from FlutterFlow/pinkesh/cf-cors-issue-info
Added FAQ on Cloud Function CORS issue
2 parents 165e08b + 43b4297 commit 18ca7ce

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/ff-concepts/adding-customization/cloud-functions.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,23 @@ If you encounter deployment errors, it may be helpful to check out [this communi
282282
</details>
283283

284284

285+
<details>
286+
<summary>Why am I getting a CORS error when executing my Cloud Function?</summary>
287+
<p>
288+
The CORS error occurs because the **Access-Control-Allow-Origin** header is missing from the response, preventing your request from being completed. This issue can arise with new Cloud Functions, whether deployed through FlutterFlow or not.
289+
290+
Follow the steps below to fix the issue:
291+
292+
1. Open your Google Cloud Project's [**Cloud Functions List**](https://console.cloud.google.com/functions/list)
293+
2. Select the function causing the issue.
294+
3. Navigate to the **Permissions** tab.
295+
4. Open the **VIEW BY ROLES** tab.
296+
5. Ensure there's a row with `Cloud Functions Invoker` with principal set to `allUsers`. If it’s missing, click on the **Grant Access**, add `allUsers` with the `Cloud Functions Invoker` role.
297+
298+
![add-cf-invoker-role](imgs/add-cf-invoker-role.avif)
299+
</p>
300+
</details>
301+
302+
285303

286304

Binary file not shown.

0 commit comments

Comments
 (0)