mirror of
https://github.com/immich-app/immich.git
synced 2025-05-30 19:54:52 -04:00
Fixed issue socket-io cannot be connected in production build on web
This commit is contained in:
parent
799a1c99f2
commit
4aa66f4156
@ -244,6 +244,7 @@ export class AssetService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Sending Partial Content With HTTP Code 206 */
|
/** Sending Partial Content With HTTP Code 206 */
|
||||||
|
console.log('Send Range', range);
|
||||||
res.status(206).set({
|
res.status(206).set({
|
||||||
'Content-Range': `bytes ${start}-${end}/${size}`,
|
'Content-Range': `bytes ${start}-${end}/${size}`,
|
||||||
'Accept-Ranges': 'bytes',
|
'Accept-Ranges': 'bytes',
|
||||||
|
@ -52,7 +52,6 @@
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: 'bearer ' + $session.user.accessToken,
|
Authorization: 'bearer ' + $session.user.accessToken,
|
||||||
'Accept-Range': 'bytes',
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import { assets } from './assets';
|
|||||||
|
|
||||||
export const openWebsocketConnection = (accessToken: string) => {
|
export const openWebsocketConnection = (accessToken: string) => {
|
||||||
const websocket = io(serverEndpoint, {
|
const websocket = io(serverEndpoint, {
|
||||||
transports: ['polling'],
|
transports: ['websocket', 'polling'],
|
||||||
reconnection: true,
|
reconnection: true,
|
||||||
forceNew: true,
|
forceNew: true,
|
||||||
autoConnect: true,
|
autoConnect: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user