Skip to content

Commit

Permalink
Merge pull request #10 from simmbiote/patch-1
Browse files Browse the repository at this point in the history
Update code sample
  • Loading branch information
Ankcorn authored Jul 3, 2024
2 parents 31ca912 + ba3e6a0 commit 3f6316c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sending-data/platforms/cloudflare/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ npm i -S @baselime/edge-logger
import { BaselimeLogger } from "@baselime/edge-logger"

export function onRequest(context) {
const url = new URL(request.url);
const url = new URL(context.request.url);
const logger = new BaselimeLogger({
service: "your-service-name",
namespace: `${request.method} ${url.hostname}${url.pathname}`,
namespace: `${context.request.method} ${url.hostname}${url.pathname}`,
apiKey: context.env.BASELIME_API_KEY,
ctx: context,
isLocalDev: context.env.IS_LOCAL
Expand Down

0 comments on commit 3f6316c

Please sign in to comment.