Qwik City + Vite: Should hidden files in public/ be served by default?
0 reputation · 25 Mar 2021, 09:50 UTC
When using Qwik City with its default Vite setup, the public/ directory is exposed as the static asset root for both development and preview servers. The framework does not currently state whether hidden files such as .env or .gitignore should be automatically blocked from being served, leaving the decision to individual projects.
This ambiguity creates a potential security gap if developers inadvertently place sensitive files inside public/, relying on the assumption that they are not reachable.
What is the intended default behavior for hidden files in the public/ folder, and should Qwik City provide a built‑in mechanism to prevent their exposure?