Jump to content

Help Needed: CORS Issue Connecting Squarespace to Pipedream Webhook

Recommended Posts

Posted

Site URL: https://www.thegrowthadvisor.com/gpt-test

Hey everyone,

I'm trying to connect my Squarespace site to a Pipedream webhook for a chatbot project, and I'm hitting a CORS (Cross-Origin Resource Sharing) issue.

You can see my attempt here using a code block: https://www.thegrowthadvisor.com/gpt-test

I've set up my JavaScript to send a POST request to Pipedream, but the console is showing errors like:

Access to fetch at 'https://xxxx.pipedream.net/' from origin 'https://thegrowthadvisor.com' has been blocked by CORS policy.

It seems that the request is getting blocked because my website and Pipedream are on different domains.

I've tried setting response headers on Pipedream as follows:

  • Access-Control-Allow-Origin: https://www.mysite.com
  • Access-Control-Allow-Methods: GET, POST, OPTIONS
  • Access-Control-Allow-Headers: Content-Type

But I still get the "Failed to Fetch" error in the browser console.

My question is:

  1. Is there something wrong with my configuration on Pipedream, or am I missing anything with how I've set up my request in JavaScript?
  2. Do I need to adjust something specifically in Squarespace’s settings to allow cross-origin requests?

Any help or advice would be greatly appreciated! This project has been stuck at this point for a while now, and I'm hoping someone here might have faced a similar issue.

Thanks in advance!

 

Screenshot 2024-10-14 at 00.36.54.png

  • Replies 0
  • Views 361
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.