mirror of
https://github.com/Radiquum/AniX.git
synced 2025-09-03 21:15:35 +05:00
api-prox/fix: discovery for not logged in users
This commit is contained in:
parent
09ddb71e15
commit
88664a86d1
1 changed files with 7 additions and 3 deletions
|
@ -226,7 +226,9 @@ app.get("/*path", async (req, res) => {
|
|||
if (
|
||||
!apiResponse ||
|
||||
!apiResponse.ok ||
|
||||
apiResponse.headers.get("content-type") != "application/json"
|
||||
(apiResponse.headers.get("content-type") != "application/json" &&
|
||||
apiResponse.headers.get("content-type") !=
|
||||
"application/json;charset=UTF-8")
|
||||
) {
|
||||
logger.error(
|
||||
`Failed to fetch: '${url.protocol}//${url.hostname}${url.pathname}', Path probably doesn't exist`
|
||||
|
@ -277,7 +279,7 @@ app.post("/*path", async (req, res) => {
|
|||
"application/json",
|
||||
"application/x-www-form-urlencoded",
|
||||
"multipart/form-data",
|
||||
"x-unknown/unknown"
|
||||
"x-unknown/unknown",
|
||||
];
|
||||
|
||||
const isSupported = supportedContentTypes.includes(
|
||||
|
@ -335,7 +337,9 @@ app.post("/*path", async (req, res) => {
|
|||
if (
|
||||
!apiResponse ||
|
||||
!apiResponse.ok ||
|
||||
apiResponse.headers.get("content-type") != "application/json"
|
||||
(apiResponse.headers.get("content-type") != "application/json" &&
|
||||
apiResponse.headers.get("content-type") !=
|
||||
"application/json;charset=UTF-8")
|
||||
) {
|
||||
logger.error(
|
||||
`Failed to post: '${url.protocol}//${url.hostname}${url.pathname}', Path probably doesn't exist`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue