nystudio107 / craft-vite

Allows the use of the Vite.js next generation frontend tooling with Craft CMS
MIT License
51 stars 15 forks source link

Question about using the origin setting #35

Closed JeanLucEsser closed 2 years ago

JeanLucEsser commented 2 years ago

Question

This is about the origin setting vite added with version 2.6.

In the docs, when talking about the origin setting, you are using devServerInternal (http://localhost:3000) as an example. This is not working for me as it throws a security error and my fonts are not being loaded (I'm serving my local site over https).

As we know, devServerPublic can run over http or https whereas devServerInternal is always http. So what I'm doing is using origin with devServerPublic instead (https://projectname.ddev.site:3000) which works fine for my use case.

Question is simple: Is there any downside to doing this? What's the difference between using one or the other?

khalwat commented 2 years ago

Should be fine