From 171f4bd6d2a26a1b94f9f129d80c08f2f20cd62d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 04:18:10 +0000 Subject: Bump url-parse from 1.5.7 to 1.5.10 in /src/web Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- src/web/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/web') diff --git a/src/web/package-lock.json b/src/web/package-lock.json index 75267f07..f4161891 100644 --- a/src/web/package-lock.json +++ b/src/web/package-lock.json @@ -13458,9 +13458,9 @@ } }, "url-parse": { - "version": "1.5.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.7.tgz", - "integrity": "sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA==", + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", "requires": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" -- cgit v1.2.3 From 212e356fcb1cf431eb82a111e0dd6b8f9cbaaa52 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 1 Mar 2022 16:13:00 -0600 Subject: pass credentials when auth is disabled --- src/web/src/lib/api.js | 4 ++-- src/web/src/lib/hubFactory.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/web') diff --git a/src/web/src/lib/api.js b/src/web/src/lib/api.js index 9a62ed33..73e75373 100644 --- a/src/web/src/lib/api.js +++ b/src/web/src/lib/api.js @@ -1,5 +1,5 @@ import axios from 'axios'; -import { baseUrl, tokenPassthroughValue } from '../config'; +import { baseUrl } from '../config'; import * as session from './session'; axios.defaults.baseURL = baseUrl; @@ -13,7 +13,7 @@ api.interceptors.request.use(config => { config.headers['Content-Type'] = 'application/json'; - if (token && token !== tokenPassthroughValue) { + if (!session.isPassthroughEnabled() && token) { config.headers.Authorization = 'Bearer ' + token; } diff --git a/src/web/src/lib/hubFactory.js b/src/web/src/lib/hubFactory.js index 8ccd62ff..a64c5c40 100644 --- a/src/web/src/lib/hubFactory.js +++ b/src/web/src/lib/hubFactory.js @@ -10,7 +10,8 @@ import * as session from '../lib/session'; export const createHubConnection = ({ url }) => new HubConnectionBuilder() .withUrl(url, { - accessTokenFactory: session.getToken + withCredentials: true, + accessTokenFactory: session.isPassthroughEnabled() ? undefined : session.getToken }) .withAutomaticReconnect([0, 500, 1000, 3000, 5000, 5000, 5000, 5000, 5000]) .withHubProtocol(new JsonHubProtocol()) -- cgit v1.2.3