Skip to content

Update vite.config.js to allow serving over https#120

Open
ericzundel wants to merge 1 commit intourfdvw:mainfrom
ericzundel:zundel/add-secure-npm-run-dev-support
Open

Update vite.config.js to allow serving over https#120
ericzundel wants to merge 1 commit intourfdvw:mainfrom
ericzundel:zundel/add-secure-npm-run-dev-support

Conversation

@ericzundel
Copy link
Copy Markdown
Contributor

  • Adds https via a self generated local certificate for development e.g. running $npm run dev -- --host
  • Some APIs (Filesystem, Serial) require running on localhost or over a secure connection.

@ericzundel
Copy link
Copy Markdown
Contributor Author

My development environment is setup on a Linux server and I am testing running the IDE on different machines (laptop, etc).
The navigator.serial and the filesystem API are both not available unless you are running locahost or over a secure connection.

If you don't want to accept this patch, I can still do work, I'll just have to develop on my local machine.

@ericzundel ericzundel force-pushed the zundel/add-secure-npm-run-dev-support branch from 94e9bc4 to 6adf676 Compare July 14, 2025 04:27
@ericzundel
Copy link
Copy Markdown
Contributor Author

Maybe this is just me being a novice web developer. I found another way to workaround this on Chrome with:

chrome://flags/#unsafely-treat-insecure-origin-as-secure

- Adds https via a self generated local certificate for development
  e.g.  running `$npm run dev -- --host`
- Some APIs (Filesystem, Serial) require running on localhost or
  over a secure connection.
@ericzundel ericzundel force-pushed the zundel/add-secure-npm-run-dev-support branch from 6adf676 to cf38b61 Compare July 26, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant