R
Railwayβ€’10mo ago
LaCrak27

Help with webhooks

Railway doesn't call my webhook, but i can manually call it through postman
22 Replies
Percy
Percyβ€’10mo ago
Project ID: N/A
LaCrak27
LaCrak27β€’10mo ago
@joshmo_dev i know it is allowed
LaCrak27
LaCrak27β€’10mo ago
cuz in postman i get the expected response
No description
LaCrak27
LaCrak27β€’10mo ago
also, its not railway's fault
No description
LaCrak27
LaCrak27β€’10mo ago
since other webhooks get called
LaCrak27
LaCrak27β€’10mo ago
while on mine i just get nothin
No description
josh
joshβ€’10mo ago
wait does your /railway endpoint require authorisation?
LaCrak27
LaCrak27β€’10mo ago
nope its literally just the simplest endpoint ever
Medim
Medimβ€’10mo ago
i may be saying something dumb, but did u setup cors?
LaCrak27
LaCrak27β€’10mo ago
i may be the dumb one here... cors?
Medim
Medimβ€’10mo ago
πŸ’€ expressJs server?
LaCrak27
LaCrak27β€’10mo ago
ah fuck im dumb yes lmfao
Medim
Medimβ€’10mo ago
app.use(
cors({
origin: "*",
methods: ["GET", "POST", "DELETE", "UPDATE", "PUT", "PATCH"],
})
);
app.use(
cors({
origin: "*",
methods: ["GET", "POST", "DELETE", "UPDATE", "PUT", "PATCH"],
})
);
import cors from "cors";
LaCrak27
LaCrak27β€’10mo ago
ye ye god... my bad lmfao im dumb
Medim
Medimβ€’10mo ago
idk if thats gonna solve it tbh
LaCrak27
LaCrak27β€’10mo ago
welp, were gonna find out yep it works bro im so dumb how did i forget
Medim
Medimβ€’10mo ago
LaCrak27
LaCrak27β€’10mo ago
im sorry for wasting y'alls time i just forgot that was a thing at all
Medim
Medimβ€’10mo ago
dw real ones solve each ones dumb questions 🀝
LaCrak27
LaCrak27β€’10mo ago
real 🀝
josh
joshβ€’10mo ago
github webhooks work even through cors so this was never an issue for me in fairness (since i've never used railway hooks before and assumed it was the same)
LaCrak27
LaCrak27β€’10mo ago
yeah, same happened to me, still was a dumb mistake ngl