Skip to content

Cloudflare Headers & Terser Targeting Fixes - #113

Merged
biast12 merged 3 commits into
TicketsBot-cloud:masterfrom
Tech-TTGames:master
Oct 19, 2026
Merged

biast12 merged 3 commits into
TicketsBot-cloud:masterfrom
Tech-TTGames:master

Conversation

@Tech-TTGames

@Tech-TTGames Tech-TTGames commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR configures Cloudflare Pages security headers and ensures the build pipeline properly targets modern ES2022 JavaScript without syntax downleveling:

  • Headers & Security (3112219): Added public/_headers to set baseline security rules (HSTS, X-Frame-Options, MIME-sniffing protection) and production caching strategies (1-year immutable caching for /assets/*, zero-cache revalidation for index.html).
  • Build Target & Minification (fa0adbb): Aligned TypeScript target to ES2022 and configured terserOptions (ecma: 2020/2022) in vite.config.ts. This prevents Terser from transpiling output down to legacy ES5/ES2015 syntax during the final minification pass.

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

  • Ran bunx vite build to confirm clean asset output.

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Refines security and caching headers, adds an assets-only 404 page to preserve SPA fallback behavior, and aligns TypeScript and Terser output with ES2020 compatibility.
@biast12
biast12 merged commit 8c1130e into TicketsBot-cloud:master Oct 19, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants