R
Railwayβ€’14mo ago
LaCrak27

Help with webhooks

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