aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-03-02 11:43:25 -0600
committerGitHub <noreply@github.com>2022-03-02 11:43:25 -0600
commit58fa05650da1daccbf1a037f5d9c60631508e1ea (patch)
tree9b82826f03108404d231996a8f6674aa1871b38d
parent171f4bd6d2a26a1b94f9f129d80c08f2f20cd62d (diff)
parentd2d5dab7d4a4c8004eacf489e4d5d4120ed6dc8f (diff)
downloadslskd-58fa05650da1daccbf1a037f5d9c60631508e1ea.tar.gz
Merge branch 'master' into dependabot/npm_and_yarn/src/web/url-parse-1.5.10
-rw-r--r--README.md3
-rw-r--r--src/web/src/lib/api.js4
-rw-r--r--src/web/src/lib/hubFactory.js3
3 files changed, 4 insertions, 6 deletions
diff --git a/README.md b/README.md
index e7d123d6..ea7024c4 100644
--- a/README.md
+++ b/README.md
@@ -27,9 +27,6 @@ services:
- "5000:5000"
- "5001:5001"
- "50000:50000"
- environment:
- - PUID=1000
- - PGID=1000
volumes:
- <path/to/application/data>:/app
restart: always
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())