Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ http {
location / {
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri.html $uri/index.html =404;
add_header 'Link' '</.well-known/api-catalog>; rel="api-catalog"' always;
}
Comment on lines 17 to 21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the Link header to location /404.html. The 301 redirects were already covered (the add_header in location / uses always), and I kept it per-location rather than moving to server {}, since locations with their own add_header (/index.html, /404.html) would drop an inherited one.

location /assets/ {
try_files $uri $uri/ =404;
Expand All @@ -29,9 +30,14 @@ http {
}
location /index.html {
add_header 'Cache-Control' 'no-store' always;
add_header 'Link' '</.well-known/api-catalog>; rel="api-catalog"' always;
}
location /404.html {
add_header 'Cache-Control' 'no-store' always;
}
# RFC 9727 — extension-less file, advertise correct content type
location = /.well-known/api-catalog {
types { } default_type application/linkset+json;
}
}
}
4 changes: 4 additions & 0 deletions static/.well-known/agent-skills/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://schemas.agentskills.io/discovery/0.2.0/schema.json",
"skills": []
}
46 changes: 46 additions & 0 deletions static/.well-known/api-catalog
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"linkset": [
{
"anchor": "https://developers.stellar.org/docs/data/apis/rpc",
"service-desc": [
{
"href": "https://developers.stellar.org/stellar-rpc.openrpc.json",
"type": "application/json"
}
],
"service-doc": [
{
"href": "https://developers.stellar.org/docs/data/apis/rpc/api-reference",
"type": "text/html"
}
]
},
{
"anchor": "https://developers.stellar.org/docs/data/apis/horizon",
"service-doc": [
{
"href": "https://developers.stellar.org/docs/data/apis/horizon/api-reference",
"type": "text/html"
}
]
},
{
"anchor": "https://developers.stellar.org/docs/platforms/anchor-platform",
"service-doc": [
{
"href": "https://developers.stellar.org/docs/platforms/anchor-platform/api-reference",
"type": "text/html"
}
]
},
{
"anchor": "https://developers.stellar.org/docs/platforms/stellar-disbursement-platform",
"service-doc": [
{
"href": "https://developers.stellar.org/docs/platforms/stellar-disbursement-platform/api-reference",
"type": "text/html"
}
]
}
]
}
1 change: 1 addition & 0 deletions static/robots.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

User-agent: *
Allow: /
Content-Signal: ai-train=yes, search=yes, ai-input=yes
Sitemap: https://developers.stellar.org/sitemap.xml
Loading