Link header#3547
Open
mich-elle-luna wants to merge 6 commits into
Open
Conversation
- Create /.well-known/api-catalog (RFC 9727) listing the commands reference, developer docs, Redis Cloud REST API, and RDI API - Add <link rel="api-catalog">, <link rel="service-doc">, and <link rel="service-desc"> to baseof.html — RFC 8288 recognises HTML link elements as equivalent to HTTP Link response headers - Configure [server] headers in config.toml so hugo serve also sends the Link header during local development; production deployments should mirror this in the nginx ingress or CDN configuration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng bug Placing [server] before root-level keys like refLinksErrorLevel caused them to be parsed as server.* instead of root-level Hugo settings, silencing the WARNING level and treating REF_NOT_FOUND as build errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
- Switch from absURL to relURL so links resolve within the site prefix
rather than the host root (avoids broken links when Hugo is deployed
under /docs/latest/). Add a comment noting nginx should also alias
/.well-known/api-catalog at the host root for full RFC 8615 compliance.
- Reformat api-catalog as RFC 9264 Linkset (application/linkset+json)
instead of a custom {"apis":[...]} document; update the service-desc
link type accordingly so standards-based discovery clients can parse it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Relative targets like .well-known/api-catalog resolve against each request URL, pointing to the wrong path on deep doc pages. Use root-relative paths (leading /) which resolve correctly for hugo serve where there is no site path prefix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Matches the type="application/linkset+json" already present on the equivalent HTML <link> in baseof.html. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ddb32e1. Configure here.
- Add comment explaining the [server] Link headers use root-relative paths that assume no site prefix (standard hugo serve); HTML <link> elements via relURL are the authoritative implementation for prefixed deployments - Add server header rule to serve /.well-known/api-catalog as application/linkset+json — the extensionless file would otherwise get a generic MIME type, breaking RFC 9264/9727 clients Co-Authored-By: Claude Sonnet 4.6 <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.

Note
Low Risk
Static metadata and HTTP headers only; no runtime, auth, or data-path changes, with production behavior still dependent on separate ingress/CDN config.
Overview
Adds agent/API discovery for the docs site using RFC 8288-style linking and a linkset catalog at
static/.well-known/api-catalog.Every page now emits HTML
<link>tags inbaseof.htmlforapi-catalog,service-doc(developer docs), andservice-desc(the catalog asapplication/linkset+json), withrelURLso paths work under a site prefix. The catalog JSON lists anchors andservice-docentries for commands, develop docs, Redis Cloud API, and RDI reference.For local
hugo serve,config.tomladds matchingLinkresponse headers on all routes and setsContent-Type: application/linkset+jsonfor the catalog file. Comments note that production should mirror these headers (and host-root/.well-knownaliasing) in nginx or the CDN.Reviewed by Cursor Bugbot for commit f2f278e. Bugbot is set up for automated code reviews on this repo. Configure here.