question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Verdacio docker and nginx ssl, error HTTPS request has been blocked

See original GitHub issue

Discussed in https://github.com/verdaccio/verdaccio/discussions/3250

<div type='discussions-op-text'>

Originally posted by Tsunani June 27, 2022 If I use recommended conf, page not load:

location /verdaccio/ {
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Host $host;
  proxy_set_header X-NginX-Proxy true;
  proxy_pass http://localhost:6666;
  proxy_redirect off;
}

And get some errors:

Mixed Content: The page at 'https://my.site/verdaccio/' was loaded over HTTPS, but requested an insecure script 'http://my.site/verdaccio/-/static/main.f6e570dfe38870ab429f5.js'. This request has been blocked; the content must be served over HTTPS.

But HTTP work fine. Pls help solve the problem.</div>

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Yechuanjiecommented, Oct 13, 2022

set the VERDACCIO_PUBLIC_URL env variable to https://my.site And recreate container, it work

i have change VERDACCIO_PUBLIC_URL to my domain. and set url_prefix: ‘/’ but got another error:

fatal--- cannot open config file /root/.config/verdaccio/config.yaml: YAMLException: can not read a block mapping entry; a multiline key may not be an implicit key (116:11)

 113 | #url_prefix: '/'
 114 | # // url -> https://somedomain.org/my_prefix/
 115 | VERDACCIO_PUBLIC_URL='https://my.site
 116 | url_prefix: '/'
-----------------^
 117 | # // url -> https://somedomain.org/
 118 | # VERDACCIO_PUBLIC_URL='https://somedomai ...

这是它文档的问题,改成这样就可以了

VERDACCIO_PUBLIC_URL: 'https://my.site'
url_prefix: '/'
1reaction
Tsunanicommented, Jun 28, 2022

set the VERDACCIO_PUBLIC_URL env variable to https://my.site And recreate container, it work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Verdacio docker and nginx ssl, error HTTPS request has been ...
This request has been blocked; the content must be served over HTTPS. But HTTP work fine. Pls help solve the problem.
Read more >
verdaccio and nginx (refused to connect) - Stack Overflow
This request has been blocked; the content must be served over HTTPS. nginx · ssl · https · reverse-proxy · verdaccio · Share....
Read more >
How to solve nginx reverse proxy mixed content(http, https)
This request has been blocked; the content must be served over HTTPS. I also got this kind of warning: The page at 'https://domain.com/service1 ......
Read more >
Reverse Proxy Setup - Verdaccio
Reverse Proxy Setup. Using a reverse proxy is a common practice. The following configurations are the most recommended and used ones.
Read more >
NGINX Proxy for CORS - Perficient Blogs
The Access-Control-Request-* CORS headers tell the server ... from origin 'http://localhost:3000' has been blocked by CORS policy: No ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found