Title: `--public` mode seeds the server-root landing page into the served directory (namespace pollution for servejss / serve use case) · Issue #578 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub
Open Graph Title: `--public` mode seeds the server-root landing page into the served directory (namespace pollution for servejss / serve use case) · Issue #578 · JavaScriptSolidServer/JavaScriptSolidServer
X Title: `--public` mode seeds the server-root landing page into the served directory (namespace pollution for servejss / serve use case) · Issue #578 · JavaScriptSolidServer/JavaScriptSolidServer
Description: Problem Since the #433/#435 landing-page work, startup seeds /index.html, /.acl, and /index.html.acl into DATA_ROOT (skip-if-exists). This also happens in --public mode, where: WAC is bypassed, so the seeded ACLs are never consulted — th...
Open Graph Description: Problem Since the #433/#435 landing-page work, startup seeds /index.html, /.acl, and /index.html.acl into DATA_ROOT (skip-if-exists). This also happens in --public mode, where: WAC is bypassed, so ...
X Description: Problem Since the #433/#435 landing-page work, startup seeds /index.html, /.acl, and /index.html.acl into DATA_ROOT (skip-if-exists). This also happens in --public mode, where: WAC is bypassed, so ...
Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/578
X: @github
Domain: github.com
IPv4 address: 140.82.113.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`--public` mode seeds the server-root landing page into the served directory (namespace pollution for servejss / serve use case)","articleBody":"## Problem\n\nSince the #433/#435 landing-page work, startup seeds `/index.html`, `/.acl`, and `/index.html.acl` into DATA_ROOT (skip-if-exists). This also happens in `--public` mode, where:\n\n- WAC is bypassed, so the seeded ACLs are never consulted — they are dead files.\n- The page's only dynamic behaviour — the HEAD-adaptive Sign up / Sign in buttons (#435) — is meaningless without auth.\n\nFor the serve-a-directory use case that `--public` was created for (#107 explicitly lists the jsserve wrapper as a primary motivation: *\"use JSS as a simple 'just serve this folder' tool like npx serve\"*), this writes three files into the user's project directory.\n\nReproduced with `jss start --root \u003cdir> --public` on 0.0.210: the served tree gains `index.html`, `.acl`, `index.html.acl`. This regressed servejss's \"like `serve`\" behaviour — early JSS versions left the served directory untouched.\n\n## Fix\n\nSkip `seedServerRoot` when `options.public` is set, alongside the existing read-only skip (`src/server.js`). Operators who want a landing page in public mode can still create `/index.html` by hand — skip-if-exists already honours it. Regression tests in `test/server-root.test.js` (public mode seeds nothing; container listing + file reads still work).\n\nThe two features were built for disjoint audiences — the landing page for pod providers (#276 / #303: \"new pod providers had to build a landing page from scratch\"), `--public` for serve-style file serving (#107) — and no point in the #276→#435 design history considered the `--public` case, so the collision is an oversight rather than a decision.\n\n## Considered alternatives\n\n- **Explicit `--no-root-page` flag** — leaves bare `jss --public` polluted by default (the exact complaint) and adds plumbing; explicitness only helps when the default is right.\n- **servejss deletes seeded files post-start** — racy, churns file watchers, risks deleting a legitimate user-owned `index.html` unless it fingerprints the template.\n- **Virtual (never-written) landing page** — the deeper #276 redesign; orthogonal and can layer on later, at which point the public-mode skip becomes redundant rather than wrong.\n\nRefs #107, #276, #433, #435, #459, #108.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-07-02T00:19:49Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/578"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:657cb7a7-9364-4246-6694-d40bcde04fad |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4A4:7DF65:F6C4D:1398AD:6B038995 |
| html-safe-nonce | f9f7b575889fb0418444dcb678ca119df2244902455c1134de2debfa334b8591 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNEE0OjdERjY1OkY2QzREOjEzOThBRDo2QjAzODk5NSIsInZpc2l0b3JfaWQiOiIzMTkwMTY1OTA2NjkzMjYxNzE3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c93ab08cb98264f9a2345080be475a90c78eb26c10b457da5ae7581499c4a736 |
| hovercard-subject-tag | issue:4790183010 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/578/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a2d3f719ca990fb7b6d3fa6156c4fa3d3480f2c1db23a57784e68f5f302637ba/JavaScriptSolidServer/JavaScriptSolidServer/issues/578 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a2d3f719ca990fb7b6d3fa6156c4fa3d3480f2c1db23a57784e68f5f302637ba/JavaScriptSolidServer/JavaScriptSolidServer/issues/578 |
| og:image:alt | Problem Since the #433/#435 landing-page work, startup seeds /index.html, /.acl, and /index.html.acl into DATA_ROOT (skip-if-exists). This also happens in --public mode, where: WAC is bypassed, so ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 958025407 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 958025407 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/JavaScriptSolidServer |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width