Teddy101 Posted October 13 Posted October 13 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: Is there something wrong with my configuration on Pipedream, or am I missing anything with how I've set up my request in JavaScript? 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!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment