Openedx Tutor API not working when running behind NGINX

Hi, I have installed tutor PALM version now. Im running my tutor instance behind NGINX. For this I have made the changes to the following in config.yml file

CADDY_HTTP_PORT: 81
ENABLE_HTTPS: true
ENABLE_WEB_PROXY: false

I have also made the necessary changes to my nginx configuration files also and my site loads without any error.

But the problem is when I try to access the API pages using the following https://sampledomain.com/api-docs/ the swagger page loads. But the scheme only shows “HTTP” alone. HTTPS is not seen. Due to this when I try to run any simple API like listing the users, I get the following error:

Failed to fetch.
Possible Reasons:

CORS
Network Failure
URL scheme must be “http” or “https” for CORS request.

Can someone please help?. Thanks in advance.