mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-22 08:38:08 +02:00
fix(docs-site): add docs index redirect, test, and trim Accept media type
Redirect bare /docs to the introduction page with proper metadata resolution. Add a test for the redirect. Trim the media type in the Accept header parser so whitespace around semicolons does not break markdown content negotiation. Add a test script to package.json. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e79caa8fb9
commit
b4a302edfa
4 changed files with 33 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ function isMarkdownPreferred(acceptHeader: string | null) {
|
|||
.find((parameter) => parameter.startsWith("q="));
|
||||
|
||||
return {
|
||||
type: type.toLowerCase(),
|
||||
type: type.trim().toLowerCase(),
|
||||
quality: quality ? Number.parseFloat(quality.slice(2)) : 1,
|
||||
index,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue