diff --git a/DECISIONS.md b/DECISIONS.md index 04f3835..f548bf2 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -34,14 +34,18 @@ One line per decision, with the reason. ## Client injection - Registration with File Transformation is done purely by reflection, including building the payload: the `JObject` is created by calling `Parse` on the parameter type of `RegisterTransformation`, so the plugin has no Newtonsoft reference of its own. -- The file pattern is `^index\.html$`. File Transformation treats patterns as regular expressions, and the unanchored `index.html` also matched the script chunk `session-login-index-html..chunk.js`, which broke the login page. Found in the container test. -- The transformer leaves anything without a `` alone, as a second line of defence against touching non-HTML files. +- The file pattern is the literal `index.html`, the same string every other plugin registers. File Transformation groups callbacks by pattern string and, for a request, runs only the group whose key equals the requested path; a regex fallback is used only when no key matches exactly. The earlier anchored `^index\.html$` was therefore never called once MediaBar (or any plugin using `index.html`) was installed. Found by reproducing a server with MediaBar and Jellyfin Enhanced. +- As a regular expression `index.html` also matches script chunks such as `session-login-index-html..chunk.js`, so those are handed to the callback too. The transformer returns anything that is not an HTML page (`` present) unchanged. - The script tag uses the relative URL `../Herald/client.js` so it keeps working behind a base URL. - `GET /Herald/client.js` is anonymous: a `