OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

OpenSSL python-flask API subdomain

  • Thread starter Thread starter pn1982
  • Start date Start date
P

pn1982

Guest
I have an API service built on Python-Flask & hosted on a subdomain e.g. api.example.com, I have installed OpenSSL ceritificate with CN (wildcard) as *.example.com

My react app is hosted on a domain example.com, but when I am tring to access https://wwww.example.com, it calls API which is giving an error ERR_CERT_AUTHORITY_INVALID. Looking for some help here

my nginx conf file is as

Code:
server {
                listen 443 ssl;
                ssl_certificate /home/ubuntu/ssl/cert.pem;
                ssl_certificate_key /home/ubuntu/ssl/key.pem;

                server_name example.com;
                
                access_log /var/log/nginx/access.log;
                error_log /var/log/nginx/error.log;
                
                ssl_session_timeout 10m;


                location / {
                include proxy_params;
                proxy_pass http://127.0.0.1:5001;
                add_header 'Access-Control-Allow-Origin' "*";
                add_header Vary Origin; 

                
                }
            
            }
<p>I have an API service built on Python-Flask & hosted on a subdomain e.g. api.example.com,
I have installed OpenSSL ceritificate with CN (wildcard) as *.example.com</p>
<p>My react app is hosted on a domain example.com, but when I am tring to access <a href="https://wwww.example.com" rel="nofollow noreferrer">https://wwww.example.com</a>, it calls API which is giving an error ERR_CERT_AUTHORITY_INVALID.
Looking for some help here</p>
<p>my nginx conf file is as</p>
<pre><code>server {
listen 443 ssl;
ssl_certificate /home/ubuntu/ssl/cert.pem;
ssl_certificate_key /home/ubuntu/ssl/key.pem;

server_name example.com;

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

ssl_session_timeout 10m;


location / {
include proxy_params;
proxy_pass http://127.0.0.1:5001
add_header 'Access-Control-Allow-Origin' "*";
add_header Vary Origin;


}

}
</code></pre>
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top