andrzej | t2
andrzej | t2
RRailway
Created by andrzej | t2 on 3/7/2023 in #✋|help
Testing custom webhook url on ephemeral environment
Hi, I'm trying to test a custom webhook endpoint, that is a part of node.js/express app hosted on railway's ephemeral environment. I've created a simple POST endpoint that basically does console.log of request.body. Whenever I try to trigger that api call via TestURL button in the settings/webhooks tab, I can see that there's CORS error thrown:
'https://my-railway-app-on-ephemeral-env.up.railway.app/railway-webhook' from origin 'https://railway.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
'https://my-railway-app-on-ephemeral-env.up.railway.app/railway-webhook' from origin 'https://railway.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Please advise
7 replies