R
Railwayβ€’15mo ago
LaCrak27

Help with webhooks

Railway doesn't call my webhook, but i can manually call it through postman
22 Replies
Percy
Percyβ€’15mo ago
Project ID: N/A
LaCrak27
LaCrak27OPβ€’15mo ago
@joshmo_dev i know it is allowed
LaCrak27
LaCrak27OPβ€’15mo ago
cuz in postman i get the expected response
No description
LaCrak27
LaCrak27OPβ€’15mo ago
also, its not railway's fault
No description
LaCrak27
LaCrak27OPβ€’15mo ago
since other webhooks get called
LaCrak27
LaCrak27OPβ€’15mo ago
while on mine i just get nothin
No description
josh
joshβ€’15mo ago
wait does your /railway endpoint require authorisation?
LaCrak27
LaCrak27OPβ€’15mo ago
nope its literally just the simplest endpoint ever
Medim
Medimβ€’15mo ago
i may be saying something dumb, but did u setup cors?
LaCrak27
LaCrak27OPβ€’15mo ago
i may be the dumb one here... cors?
Medim
Medimβ€’15mo ago
πŸ’€ expressJs server?
LaCrak27
LaCrak27OPβ€’15mo ago
ah fuck im dumb yes lmfao
Medim
Medimβ€’15mo 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
LaCrak27OPβ€’15mo ago
ye ye god... my bad lmfao im dumb
Medim
Medimβ€’15mo ago
idk if thats gonna solve it tbh
LaCrak27
LaCrak27OPβ€’15mo ago
welp, were gonna find out yep it works bro im so dumb how did i forget
Medim
Medimβ€’15mo ago
LaCrak27
LaCrak27OPβ€’15mo ago
im sorry for wasting y'alls time i just forgot that was a thing at all
Medim
Medimβ€’15mo ago
dw real ones solve each ones dumb questions 🀝
LaCrak27
LaCrak27OPβ€’15mo ago
real 🀝
josh
joshβ€’15mo 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
LaCrak27OPβ€’15mo ago
yeah, same happened to me, still was a dumb mistake ngl
Want results from more Discord servers?
Add your server