aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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())