Skip to content

7.4 billion tokens per month. 34 free LLM providers. 635 free model endpoints. All behind one /v1 endpoint, plus any custom OpenAI-compatible endpoint. Smart routing, automatic failover, encrypted keys. Personal experimentation only.

TypeScript

Add .gitattributes to pin LF, fixing CSP hash mismatch on Windows (#784)

OhOkThisIsFine54e8190b6838
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..286cdf55
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,31 @@
+# Normalize line endings in the repository to LF.
+#
+# Without this, Git for Windows' default `core.autocrlf=true` checks text files
+# out with CRLF. That is not cosmetic here: server/src/app.ts pins
+# INLINE_BOOTSTRAP_SHA, the SHA-256 of the inline theme bootstrap in
+# client/index.html, and serves it in the CSP `script-src` directive. A CRLF
+# checkout changes those bytes, so the hash no longer matches the script it is
+# meant to authorize — the browser blocks the bootstrap and dark-mode users get
+# the white flash that #682 fixed. csp-inline-bootstrap.test.ts catches it, but
+# only after a Windows clone already fails two tests out of the box.
+* text=auto eol=lf
+
+# Binary assets must never be line-ending converted.
+*.png binary
+*.jpg binary
+*.jpeg binary
+*.gif binary
+*.ico binary
+*.webp binary
+*.woff binary
+*.woff2 binary
+*.ttf binary
+*.eot binary
+*.pdf binary
+*.zip binary
+*.node binary
+*.db binary
+
+# Windows-only scripts are fine either way, but keep them LF for consistency
+# with the rest of the tree; PowerShell reads LF without complaint.
+*.ps1 text eol=lf