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.

Starting in https with a custom host uses untrusted certs

See original GitHub issue

Environment


  • Operating System: Darwin
  • Node Version: v16.15.1
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: npm@8.12.1
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

N/A

Describe the bug

When running in https with a custom host, the used certificates are untrusted, resulting in Chrome blocking the page and there’s no way to trust the certificate either.

For now, I’ll still use openssl to generate my own, which work fine (but you need to manually trust them in your keychain).

Additional context

No response

Logs

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
pi0commented, Sep 20, 2022

Hmm this is strange. Testing on MacOS, latest chrome and yarn dev --https --host local.reinier.remx.xyz it works: (maybe restarting browser or leftover HTS rules?)

image

But anyway if you plan to have long term development, your own cert is probably best idea 👍🏼 (closing issue as seems working fine. please ping to reopen if feel something is not working as expected)

0reactions
TheDutchCodercommented, Sep 20, 2022

Ah, I think the issue is I run npx nuxi dev, not npm run dev. Let me test with npm quickly.

Edit: no dice. I also have to add the custom host to /etc/hosts otherwise you’ll get a “No random port available” error. I wonder if it’s OS related, though I have the latest MacOS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Simple Explanation of SSL Certificate Errors & How to Fix ...
1. SSL Certificate Not Trusted Error. This error indicates that the SSL certificate is signed or approved by a company that the browser...
Read more >
Getting Chrome to accept self-signed localhost certificate
On the page with the untrusted certificate ( https:// is crossed out in red), click the lock > Certificate Information. NOTE: on newer...
Read more >
How to use HTTPS for local development - web.dev
To use HTTPS with your local development site and access https://localhost or https://mysite.example (custom hostname), you need a TLS ...
Read more >
How to Create Your Own SSL Certificate Authority for Local ...
Learn how to set up your own SSL Certificate Authority for local HTTPS web development.
Read more >
Configure HTTPS on a custom domain for Azure Front Door ...
To enable the HTTPS protocol for securely delivering content on a Front Door custom domain, you must use a TLS/SSL certificate.
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