Description
Describe the bug
When building your app, in the generated build files, Svelte is exposing all the existing routes. Even the routes that might be behind auth. Even though the users will not be able to see the contents of a page, it might expose sensitive data that you don't want to be publicly visible.
For example:
, me = {
"/admin": [7, [3]],
"/admin/takeovertheworld": [8, [3]],
"/admin/ban-all-users": [8, [3]],
"/(marketing)/shop": [-7, [2]],
"/(marketing)/shop/unreleased-product-name": [-7, [2]],
"/api/......": [-7, [2]],
}
It's like having a lock on your door, but providing a thief 🥷 with a detailed floorplan 🗺️ of the house.
I am unable to find a config setting that prevents this behaviour. To me, this makes SvelteKit a no-go to use. Which would be a pity.
Reproduction
Build the app, use Chrome, go to the Web Inspector > Sources > _app/immutable/entry/app.xxxxx.js
At the bottom of this file (in my case) you can see all the exposed urls.
Logs
No response
System Info
-
Severity
blocking all usage of SvelteKit
Additional Information
No response