Repository navigation
Cut Firebase Hosting bandwidth - #13
Merged
Merged
Conversation
Bot scanners probing /wp-login.php, /.env etc. each downloaded the full Gatsby 404 page (~660 KB raw). Replace it with a 763 B static page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Homepage HTML drops from 677 KB to 21 KB raw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drops the base64-inlined cyrillic/greek/vietnamese faces; the remaining files exceed webpack's inline limit and ship as separate /static assets. CSS goes from 656 KB to 237 KB raw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Firebase reported 8 of 10 GB used on the Spark plan this month, and Umami shows 5 human visitors. Almost all of that transfer is bots: vulnerability scanners probing
/wp-login.php,/.envand similar paths, each getting the full 660 KB 404 page.Changes
src/pages/404.jsis replaced bystatic/404.html, a plain 763 B page with no fonts and no JS.onPreRenderHTMLingatsby-ssr.jsswaps the inlined<style data-href>block for a<link>in production builds.gatsby-browser.jsimports only the latin subsets of Inter and JetBrains Mono, at the same weights as before. There is no Czech text in the content. The remaining font files are over webpack's inline limit, so they ship as separate/static/*.woff2files and no webpack override was needed.firebase.jsonnow marksstatic/**and*.js/*.cssas immutable for a year, while HTML andpage-datarevalidate on every request. There is nosw.jsrule becausegatsby-plugin-offlineis disabled.*is still allowed.Build output (clean
gatsby build, Node 24, Docker)404.htmlindex.htmlstyles.<hash>.cssThe CSS is still 237 KB raw, which is mostly Bootstrap. It's now cached as immutable and downloaded once per visitor rather than with every page, so trimming it is left for a follow-up.
Verification after deploy
🤖 Generated with Claude Code