The dev command should use a POST request when doing the PING to the local server
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@trigger.dev/express": patch
|
||||
"@trigger.dev/cli": patch
|
||||
---
|
||||
|
||||
The dev command should use a POST request when doing the PING to the local server
|
||||
@@ -71,7 +71,7 @@ export async function devCommand(path: string, anyOptions: any) {
|
||||
|
||||
try {
|
||||
await fetch(localEndpointHandlerUrl, {
|
||||
method: "HEAD",
|
||||
method: "POST",
|
||||
headers: {
|
||||
"x-trigger-api-key": apiKey,
|
||||
"x-trigger-action": "PING",
|
||||
|
||||
@@ -60,6 +60,12 @@ export function createMiddleware(client: TriggerClient, path: string = "/api/tri
|
||||
return;
|
||||
}
|
||||
|
||||
if (req.method === "HEAD") {
|
||||
res.sendStatus(200);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const request = convertToStandardRequest(req);
|
||||
|
||||
const response = await client.handleRequest(request);
|
||||
|
||||
Reference in New Issue
Block a user