1

I have deployed a simple chatUI-app on vercel which is fetching chats from this API

"http://3.111.128.67/assignment/chat?page=0"

It was running fine in development but as I deployed it on vercel the app is not fetching chats and throwing this error
Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID

I checked that it is happening due to http in the API, but not able to figure out how to solve this I even have added
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
to my index.html but it didn't work.

1 Answers1

0

This error states that you have an issue with your SSL Certificate. To resolve, use HTTPS or set up a reverse proxy. Or you can enable HTTP Access on Vercel by modifying vercel.json :

{
  "build": {
    "env": {
      "VERCEL_ROUTER_INCLUDE": "http://3.111.128.67/*"
    }
  }
}

Hazik Arshad
  • 456
  • 2
  • 8
  • can you tell me from where I'll get vercel.json. Do I need to create it in my root? – Gaurav Tak May 22 '23 at 13:29
  • How did you uploaded to vercel? There should be a vercel.json in your root. – Hazik Arshad May 23 '23 at 05:20
  • I don't think that it is necessary to have a vercel.json to deploy on vercel. Actually this works when I tweaked some settings in browser in order to fetch the data from an insecure resource. – Gaurav Tak May 24 '23 at 07:56