Add NEXT_PUBLIC_SENTRY_DSN

pull/31/head
Samuel Lippert 2022-08-10 14:19:22 -05:00
parent 03d66ea1b3
commit 9294150029
No known key found for this signature in database
GPG Key ID: 3762857AF8948B2C
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import type { Handler } from 'https://raw.githubusercontent.com/honojs/hono/v2.0
export const sentry = (): Handler => {
return async (c, next) => {
// const sentry = new Toucan({
// dsn: c.env.SENTRY_DSN,
// dsn: c.env.SENTRY_DSN || || c.env.NEXT_PUBLIC_SENTRY_DSN,
// request: c.req,
// allowedHeaders: ['user-agent'],
// allowedSearchParams: /(.*)/,

View File

@ -4,7 +4,7 @@ import Toucan from 'toucan-js'
export const sentry = (): Handler => {
return async (c, next) => {
const sentry = new Toucan({
dsn: c.env.SENTRY_DSN,
dsn: c.env.SENTRY_DSN || c.env.NEXT_PUBLIC_SENTRY_DSN,
request: c.req,
allowedHeaders: ['user-agent'],
allowedSearchParams: /(.*)/,