Skip to content

Commit 89d603e

Browse files
committed
add discovery headers and robots.txt
1 parent 82f551c commit 89d603e

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

‎static/_headers‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# Cache-Control for HTML pages: no long-term cache
1414
Cache-Control: public, max-age=0, must-revalidate
1515

16+
# Homepage discovery links for agents and API consumers
17+
/
18+
Link: </llms.txt>; rel="describedby"; type="text/plain", </openAPI/content/v4.json>; rel="service-desc"; type="application/json", </openAPI/oauth2-apis/v1.json>; rel="service-desc"; type="application/json", </openAPI/search/v1.json>; rel="service-desc"; type="application/json", </openAPI/user-related-apis/v1.json>; rel="service-desc"; type="application/json", </docs/content_apis_versioned/content-apis/>; rel="service-doc"; type="text/html", </docs/oauth2_apis_versioned/oauth-2-apis/>; rel="service-doc"; type="text/html", </docs/search_apis_versioned/quran-foundation-search-api/>; rel="service-doc"; type="text/html", </docs/user_related_apis_versioned/user-related-apis/>; rel="service-doc"; type="text/html", </docs/tutorials/oidc/getting-started-with-oauth2/>; rel="service-doc"; type="text/html", </docs/quickstart/>; rel="service-doc"; type="text/html", </docs/tutorials/oidc/user-apis-quickstart/>; rel="service-doc"; type="text/html", </docs/user_related_apis_versioned/scopes/>; rel="service-doc"; type="text/html", </request-access/>; rel="service-doc"; type="text/html"
19+
1620
# Cache hashed JavaScript and CSS files for 1 year (they have content hash in filename)
1721
/assets/js/*.js
1822
Cache-Control: public, max-age=31536000, immutable
@@ -41,9 +45,25 @@
4145
/sitemap.xml
4246
Cache-Control: public, max-age=86400
4347

48+
/robots.txt
49+
! Cache-Control
50+
Cache-Control: public, max-age=86400
51+
4452
/opensearch.xml
4553
Cache-Control: public, max-age=86400
4654

4755
# API documentation pages: no long-term cache (content may update)
4856
/docs/*
4957
Cache-Control: public, max-age=0, must-revalidate
58+
59+
/search
60+
X-Robots-Tag: noindex, follow
61+
62+
/search/
63+
X-Robots-Tag: noindex, follow
64+
65+
/request-scopes
66+
X-Robots-Tag: noindex, nofollow
67+
68+
/request-scopes/
69+
X-Robots-Tag: noindex, nofollow

‎static/robots.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
User-agent: *
2+
Allow: /
3+
Disallow: /search
4+
Disallow: /request-scopes
5+
6+
Sitemap: https://api-docs.quran.foundation/sitemap.xml

0 commit comments

Comments
 (0)