Merged
Conversation
Deploying qf-api-docs with
|
| Latest commit: |
d950fb7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d369a843.qf-api-docs.pages.dev |
| Branch Preview URL: | https://codex-add-discovery-headers.qf-api-docs.pages.dev |
89d603e to
40552cd
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds homepage discovery Link headers to advertise machine-readable API descriptions and human-facing documentation, and scopes /robots.txt caching behavior via Cloudflare Pages _headers.
Changes:
- Add homepage (
/)Linkdiscovery relations (describedby,service-desc,service-doc). - Add a path-specific
/robots.txtheader rule to ensure the intended cache policy is applied.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What changed
Linkdiscovery headers for machine-readable API descriptions and human-facing documentation entry points/robots.txtheader rule instatic/_headersso the robots asset gets its intended cache policy without inheriting the default HTML cache headerstatic/_headersonlyWhy
The homepage did not advertise useful discovery relations for agents and API consumers. In addition, the existing
robots.txtasset onmainshould be handled through headers only, not re-added in this branch.Impact
GET /will return additionalLinkrelations:describedby,service-desc, andservice-docGET /robots.txtwill keep using the existing file frommain, with the intended cache behavior from_headersRoot cause
The Cloudflare Pages header configuration did not include discovery
Linkrelations on the homepage, and the robots asset needed a path-specific header override rather than a duplicate file addition.Validation
GET /returns the planned discoveryLinkheaderGET /robots.txtreturns200,Content-Type: text/plain; charset=utf-8, andCache-Control: public, max-age=86400200