mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-06 22:18:26 +01:00
Some jellyseerr clients dont set cookies
This commit is contained in:
@@ -105,7 +105,7 @@ export class JellyseerrApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
console.log("Jellyseerr connecting successfully tested!");
|
console.log("Jellyseerr connecting successfully tested!");
|
||||||
storage.setAny(JELLYSEERR_COOKIES, headers["set-cookie"]?.flatMap(c => c.split("; ")));
|
storage.setAny(JELLYSEERR_COOKIES, headers["set-cookie"]?.flatMap(c => c.split("; ")) ?? []);
|
||||||
return {
|
return {
|
||||||
isValid: true,
|
isValid: true,
|
||||||
requiresPass: true
|
requiresPass: true
|
||||||
@@ -243,7 +243,7 @@ export class JellyseerrApi {
|
|||||||
this.axios.interceptors.request.use(
|
this.axios.interceptors.request.use(
|
||||||
async (config) => {
|
async (config) => {
|
||||||
const cookies = storage.get<string[]>(JELLYSEERR_COOKIES);
|
const cookies = storage.get<string[]>(JELLYSEERR_COOKIES);
|
||||||
if (config.method !== "head" && cookies) {
|
if (cookies) {
|
||||||
const headerName = this.axios.defaults.xsrfHeaderName!!;
|
const headerName = this.axios.defaults.xsrfHeaderName!!;
|
||||||
const xsrfToken = cookies
|
const xsrfToken = cookies
|
||||||
.find(c => c.includes(headerName))
|
.find(c => c.includes(headerName))
|
||||||
|
|||||||
Reference in New Issue
Block a user