403 authorized error on client side (LOCAL HOST) when made a GET request to my server

Viewed 20

So, Basically, I have a server where images are hosted when I am trying to make a GET request to access the image file on the client side (http://localhost:3000) through this simple HTML code:

<img src="${process.env.NEXT_PUBLICAPI_URL}/uploads/picture.jpg" alt="something" />

I'm getting a 403 authorized error. But the above line of code works just fine when I'm running it in Codepen and other public online editors. Hope you guys understood the question without further explanation.

So any suggestions/solutions on how to get rid of this problem?

0 Answers
Related