From ce8df192e1f823379f64bdaf971f19019fcb35cb Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 27 Nov 2023 10:20:24 +0100 Subject: [PATCH] Forward headers --- app/nuxt.config.ts | 1 - app/pages/index.vue | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/nuxt.config.ts b/app/nuxt.config.ts index b063503b0..4d0b2b7bc 100644 --- a/app/nuxt.config.ts +++ b/app/nuxt.config.ts @@ -7,7 +7,6 @@ export default defineNuxtConfig({ public: { stacRoot: process.env.NUXT_STAC_ROOT, mapboxToken: process.env.NUXT_PUBLIC_MAPBOX_TOKEN, - password: process.env.NUXT_PUBLIC_PASSWORD, }, }, css: ['vuetify/styles'], diff --git a/app/pages/index.vue b/app/pages/index.vue index 9d408710e..fb14b9221 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -20,12 +20,12 @@ let baseURL = url.protocol + '//' + url.host + '/stac' let catalogPath = `${baseURL}/catalog.json` -console.log('password', btoa(password)) +let headers = useRequestHeaders() + +console.log({ headers }) let { data: catalogJson } = await useFetch(catalogPath, { - headers: { - Authorization: `Basic ${btoa(password)}`, - }, + headers, }) let catalog = catalogJson.value