Skip to content

Commit

Permalink
add debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed Nov 5, 2024
1 parent 82ba186 commit 926f3b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/playground-preview-worker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function createResponseHeaders(
Vary: "Origin",
});

console.log(`Creating response header for method ${request.method}`);
if (request.method === "OPTIONS") {
headers.set(
"Access-Control-Allow-Headers",
Expand Down Expand Up @@ -284,7 +285,7 @@ app.get(`${previewDomain}/.update-preview-token`, (c) => {

app.all(`${previewDomain}/*`, async (c) => {
const url = new URL(c.req.url);
if (c.req.headers.has("cf-raw-http")) {
if (c.req.raw.headers.has("cf-raw-http")) {
return handleRawHttp(c.req.raw, url, c.env);
}
if (c.req.method === "OPTIONS") {
Expand Down

0 comments on commit 926f3b4

Please sign in to comment.