mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-22 07:02:27 -04:00
Fix pagination URLs when behind SSL-terminating reverse proxy
This commit is contained in:
@@ -67,7 +67,7 @@ export const historyH = new Elysia({ tags: ["profiles"] })
|
||||
"/profiles/me/history",
|
||||
async ({
|
||||
query: { sort, filter, query, limit, after },
|
||||
headers: { "accept-language": languages },
|
||||
headers: { "accept-language": languages, ...headers },
|
||||
request: { url },
|
||||
jwt: { sub },
|
||||
}) => {
|
||||
@@ -87,7 +87,7 @@ export const historyH = new Elysia({ tags: ["profiles"] })
|
||||
progressQ: historyProgressQ,
|
||||
})) as Entry[];
|
||||
|
||||
return createPage(items, { url, sort, limit });
|
||||
return createPage(items, { url, sort, limit, headers });
|
||||
},
|
||||
{
|
||||
detail: {
|
||||
@@ -109,7 +109,11 @@ export const historyH = new Elysia({ tags: ["profiles"] })
|
||||
async ({
|
||||
params: { id },
|
||||
query: { sort, filter, query, limit, after },
|
||||
headers: { "accept-language": languages, authorization },
|
||||
headers: {
|
||||
"accept-language": languages,
|
||||
authorization,
|
||||
...headers
|
||||
},
|
||||
request: { url },
|
||||
status,
|
||||
}) => {
|
||||
@@ -132,7 +136,7 @@ export const historyH = new Elysia({ tags: ["profiles"] })
|
||||
progressQ: historyProgressQ,
|
||||
})) as Entry[];
|
||||
|
||||
return createPage(items, { url, sort, limit });
|
||||
return createPage(items, { url, sort, limit, headers });
|
||||
},
|
||||
{
|
||||
detail: {
|
||||
|
||||
@@ -69,7 +69,7 @@ export const nextup = new Elysia({ tags: ["profiles"] })
|
||||
"/profiles/me/nextup",
|
||||
async ({
|
||||
query: { sort, filter, query, limit, after },
|
||||
headers: { "accept-language": languages },
|
||||
headers: { "accept-language": languages, ...headers },
|
||||
request: { url },
|
||||
jwt: { sub },
|
||||
}) => {
|
||||
@@ -124,7 +124,7 @@ export const nextup = new Elysia({ tags: ["profiles"] })
|
||||
.limit(limit)
|
||||
.execute({ userId: sub });
|
||||
|
||||
return createPage(items, { url, sort, limit });
|
||||
return createPage(items, { url, sort, limit, headers });
|
||||
},
|
||||
{
|
||||
detail: {
|
||||
|
||||
@@ -142,7 +142,7 @@ export const watchlistH = new Elysia({ tags: ["profiles"] })
|
||||
"/profiles/me/watchlist",
|
||||
async ({
|
||||
query: { limit, after, query, sort, filter, preferOriginal },
|
||||
headers: { "accept-language": languages },
|
||||
headers: { "accept-language": languages, ...headers },
|
||||
request: { url },
|
||||
jwt: { sub, settings },
|
||||
}) => {
|
||||
@@ -162,7 +162,7 @@ export const watchlistH = new Elysia({ tags: ["profiles"] })
|
||||
relations: ["nextEntry"],
|
||||
userId: sub,
|
||||
});
|
||||
return createPage(items, { url, sort, limit });
|
||||
return createPage(items, { url, sort, limit, headers });
|
||||
},
|
||||
{
|
||||
detail: { description: "Get all movies/series in your watchlist" },
|
||||
@@ -195,7 +195,11 @@ export const watchlistH = new Elysia({ tags: ["profiles"] })
|
||||
params: { id },
|
||||
query: { limit, after, query, sort, filter, preferOriginal },
|
||||
jwt: { settings },
|
||||
headers: { "accept-language": languages, authorization },
|
||||
headers: {
|
||||
"accept-language": languages,
|
||||
authorization,
|
||||
...headers
|
||||
},
|
||||
request: { url },
|
||||
status,
|
||||
}) => {
|
||||
@@ -218,7 +222,7 @@ export const watchlistH = new Elysia({ tags: ["profiles"] })
|
||||
relations: ["nextEntry"],
|
||||
userId: uInfo.id,
|
||||
});
|
||||
return createPage(items, { url, sort, limit });
|
||||
return createPage(items, { url, sort, limit, headers });
|
||||
},
|
||||
{
|
||||
detail: {
|
||||
|
||||
Reference in New Issue
Block a user