Next.js Discord

Discord Forum

Can't fetch from non-ssl url from the middleware

Unanswered
naya posted this in #help-forum
Open in Discord
Does anyone know how to fix this?

10 Replies

add proper protocol?
and you should not fetch your own apis
@@ts-ignore add proper protocol?
Nop doesn't change anything
@@ts-ignore and you should not fetch your own apis
I'm not fetching an api, I'm fetching a page to see the status code that it returns
why not just return the page and do operations there?
because I'm handling a use case inside of the middleware that i need to do it there
this will change every path, its not a page
sorry but this is beyond my expertise