ghoshRitesh12 / aniwatch-api

Node.js API for obtaining anime information from hianime.to
https://aniwatch-api.onrender.com
MIT License
265 stars 163 forks source link

Unable to access the api ! #49

Closed JayadityaGit closed 4 months ago

JayadityaGit commented 4 months ago

I have deployed my own forked instance on vercel ,but when i try using my vite react application, it gives unauthorized error:-

this is the error:-

XHRGET http://localhost:5173/api/anime/search?q=dd&page=1 [HTTP/1.1 401 Unauthorized 121ms]

Response { type: "basic", url: "http://localhost:5173/api/anime/search?q=dd&page=1", redirected: false, status: 401, ok: false, statusText: "Unauthorized", headers: Headers(11), body: ReadableStream, bodyUsed: false } App.tsx:20:14 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data App.tsx:30:14

but when I open it on the browser, there is slight confirmation of authorization success from vercel and it gives the response...

am i missing something?

JayadityaGit commented 4 months ago

I solved it , i tweaked the settings in vercel.

ghoshRitesh12 commented 4 months ago

Nice