superstatic always loads configs from existing `firebase.json` file on project root
Maintainers usually reply within 5 days
@jabrailkhalil is already working on this.
Since Oct 3, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- firebase, javascript
- Domain
- backend
Research direction
Start with the index.js reproduction and trace superstatic.server startup with the supplied config while a firebase.json exists in the project root. Compare the resulting headers with and without firebase.json, then add coverage showing that explicit config is not unexpectedly overridden; done means the firebase.json-only header is absent in the reproduced case.
Written by the indexing model from the issue text.
Description
Would it be possible to prevent superstatic from automatically loading hosting configs from firebase.json?
When I run a code like
index.js
const superstatic = require('superstatic');
const options = {
host: "127.0.0.1",
port: 5004,
}
const config = {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"site": "demo-project"
}
const server = superstatic.server({
debug: false,
port: options.port,
hostname: options.host,
config: config,
compression: true,
cwd: process.cwd() || undefined,
}).listen(() => {
const siteName = config.target || config.site;
const label = siteName ? "hosting[" + siteName + "]" : "hosting";
if (config.public && config.public !== ".") {
console.log("BULLET", label, "Serving hosting files from: " + config.public);
}
console.log("SUCCESS", label, "Local server: " + "http://" + options.host + ":" + options.port);
});
server.on("error", (err) => {
console.log("DEBUG", `Error from superstatic server: ${err.stack || ""}`);
throw new Error(`An error occurred while starting the hosting development server:\n\n${err.message}`);
});
with a firebase.json file on project directory
firebase.json
{
"hosting": {
"public": "public",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "/",
"headers": [
{
"key": "header-in-firebase-json",
"value": "ehhhhhhhhhhhhh?????"
}
]
}
]
}
}
Running curl -I http://127.0.0.1:5004 will output a header-in-firebase-json(only specified in firebase.json) in the response headers even though I did not specify is in the config(index.js)
$ curl -I http://127.0.0.1:5004
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 234
ETag: a3b67dafcd419de50643d682c2fb2e15
Last-Modified: Thu, 22 Jan 2026 12:59:07 GMT
Vary: Accept-Encoding
header-in-firebase-json: ehhhhhhhhhhhhh?????
Date: Thu, 22 Jan 2026 13:07:54 GMT
Connection: keep-alive
Keep-Alive: timeout=5
mcve - https://github.com/aalej/superstatic-503
related to - https://github.com/firebase/firebase-tools/issues/9773
- Dominant language
- TypeScript
- Stars
- 1.1k
- Forks
- 90
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 13
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from firebase/superstatic
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
firebase/superstatic#622 ·
Maintainers usually reply within 5 days
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
firebase/superstatic#573 · 2 comments ·
Maintainers usually reply within 5 days
-
Redirect inserting unexpected slash between index and parametersPossibly taken @sean0407 claimed this 28 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 45/100
firebase/superstatic#300 ·
Maintainers usually reply within 5 days
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
firebase/superstatic#286 ·
Maintainers usually reply within 5 days
-
Difficulty 4/5 3-5 days Newbie friendliness 32/100
firebase/superstatic#277 · 4 reactions ·
Maintainers usually reply within 5 days
All issues in firebase/superstatic
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel-labs/ui#865 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
outline/outline#14638 · 1 comment ·
Maintainers usually reply within 1 day
-
wayfinder:grilling
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
patricktree/cup#484 ·
-
bot:ai-assisted component:platform-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
midnightntwrk/platform-js#69 ·
Maintainers usually reply within 1 day