Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

@vite and security

Hello,

I just noticed that when I use @vite inside the head tags, I can retrieve the full path of the project on the server /home/vincent/... in the web dev tools on the browser.

Is it a good idea to let anybody see this information ?

Is there any way to set the configuration of vite so that it doesn't show that ?

Thanks for your suggestions.

Vincent

0 likes
4 replies
Sinnbeck's avatar

You mean after running npm run build ? Where do you see it?

1 like
vincent15000's avatar

No I don't have built for the moment, it's just in dev.

I see it when I inspect the code in the browser via the dev tools.

Effectively I just checked in prod and I don't see it any more.

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@vincent15000 If it only shows in dev (as i would expect) it is not a security concern. Production would never run dev

1 like

Please or to participate in this conversation.