From 8561eed3f8688725bc774a28a6376a08872007df Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 10 Dec 2022 20:03:58 +0100 Subject: [PATCH] Add auth to capability token URL Signed-off-by: Knut Ahlers --- dist/index.html | 3 ++- src/app.vue | 6 +++++- src/config.js | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dist/index.html b/dist/index.html index fd8b261..cd27504 100644 --- a/dist/index.html +++ b/dist/index.html @@ -6,7 +6,7 @@ - BrowserPhone @@ -16,6 +16,7 @@
diff --git a/src/app.vue b/src/app.vue index 518b227..988987f 100644 --- a/src/app.vue +++ b/src/app.vue @@ -138,7 +138,11 @@ export default { this.phone.device.destroy() } - axios.get(config.capabilityTokenURL) + axios.get(config.capabilityTokenURL, { + headers: { + authorization: `Bearer ${config.capabilityTokenAuth}`, + }, + }) .then(resp => { this.phone.device = new Device(resp.data.token, opts) diff --git a/src/config.js b/src/config.js index 826f463..7e229a4 100644 --- a/src/config.js +++ b/src/config.js @@ -1,3 +1,4 @@ export default { + capabilityTokenAuth: window.capabilityTokenAuth, capabilityTokenURL: window.capabilityTokenURL, }