diff --git a/CHANGELOG.md b/CHANGELOG.md index bec829ec..c354fd82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,29 @@ # Changelog +## v0.1.12 + +[compare changes](https://github.com/nuxt-hub/core/compare/v0.1.11...v0.1.12) + +### 📖 Documentation + +- Update infos on console ([5dd90bb](https://github.com/nuxt-hub/core/commit/5dd90bb)) +- Add baseURL ([1d0172a](https://github.com/nuxt-hub/core/commit/1d0172a)) +- Add baseURL" ([ebe27fa](https://github.com/nuxt-hub/core/commit/ebe27fa)) +- Fix 404 links ([deeda79](https://github.com/nuxt-hub/core/commit/deeda79)) +- Fix lint ([ae2f19f](https://github.com/nuxt-hub/core/commit/ae2f19f)) + +### 🏡 Chore + +- Add screenshot of console ([79b798f](https://github.com/nuxt-hub/core/commit/79b798f)) +- Move console to it's own subdomain ([b165577](https://github.com/nuxt-hub/core/commit/b165577)) +- Lint ([e80195e](https://github.com/nuxt-hub/core/commit/e80195e)) +- Rename to manifest and docs improvements ([ee0e29a](https://github.com/nuxt-hub/core/commit/ee0e29a)) + +### ❤️ Contributors + +- Sébastien Chopin ([@Atinux](http://github.com/Atinux)) + ## v0.1.11 [compare changes](https://github.com/nuxt-hub/core/compare/v0.1.10...v0.1.11) diff --git a/package.json b/package.json index 314d5ca7..7ba9826c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@nuxthub/core", "private": false, - "version": "0.1.11", + "version": "0.1.12", "description": "Nuxt Toolkit to create full-stack applications on the Edge.", "repository": { "type": "git", diff --git a/src/runtime/server/middleware/1.hub-auth.ts b/src/runtime/server/middleware/1.hub-auth.ts index 5f941bf8..3f24e88f 100644 --- a/src/runtime/server/middleware/1.hub-auth.ts +++ b/src/runtime/server/middleware/1.hub-auth.ts @@ -17,12 +17,13 @@ export default eventHandler(async (event) => { message: 'Missing Authorization header' }) } + const projectKey = process.env.NUXT_HUB_PROJECT_KEY // Self-hosted NuxtHub project, user has to set a secret key to access the proxy const projectSecretKey = process.env.NUXT_HUB_PROJECT_SECRET_KEY if (projectSecretKey && secretKeyOrUserToken === projectSecretKey) { return - } else if (projectSecretKey) { + } else if (projectSecretKey && !projectKey) { throw createError({ statusCode: 401, message: 'Invalid secret key' @@ -30,7 +31,6 @@ export default eventHandler(async (event) => { } // Hosted on NuxtHub - const projectKey = process.env.NUXT_HUB_PROJECT_KEY if (projectKey) { // Here the secretKey is a user token await $fetch(`/api/projects/${projectKey}`, {