blitz-js / blitz-js/blitz

enhanced security by default

Open
#4,344 3 comments 0 reactions 0 assignees View on GitHub
status/triage
Dominant language
TypeScript
Stars
14.1k
Forks
803
PR merge metrics
No merged PRs in 30d

Description

### What do you want and why?

for streamers, blitz logs expose sensitive data by default on the terminal

### Possible implementation(s)

```
// Note: This stays in the /pages folder for the time being

import { rpcHandler } from "@blitzjs/rpc"
import { api } from "src/app/blitz-server"

const getBlitzLogLevel = (): "info" | "debug" | undefined => {
const requestedLevel = process.env.BLITZ_LOG_DISABLE_LEVEL
if (requestedLevel === "info" || requestedLevel === "debug") {
return requestedLevel
}
return undefined
}

export default api(
rpcHandler({
onError: (error, ctx) => console.log(error),
logging: {
disablelevel: getBlitzLogLevel(),
},
})
)

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.