We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a183b3d commit f4fbca0Copy full SHA for f4fbca0
src/runtime/server/middleware/1.hub-auth.ts
@@ -20,7 +20,9 @@ export default eventHandler(async (event) => {
20
21
// Self-hosted NuxtHub project, user has to set a secret key to access the proxy
22
const projectSecretKey = process.env.NUXT_HUB_PROJECT_SECRET_KEY
23
- if (projectSecretKey && secretKeyOrUserToken !== projectSecretKey) {
+ if (projectSecretKey && secretKeyOrUserToken === projectSecretKey) {
24
+ return
25
+ } else if (projectSecretKey) {
26
throw createError({
27
statusCode: 401,
28
message: 'Invalid secret key'
0 commit comments