Response headers

RTEdge.net adds a small set of headers to the pages, files and worker responses of every deployment, and a few more that depend on the host. This reference lists them as of 2026-10-04. When a header of the platform and one of yours collide, the platform wins in the cases listed under Notes.

On every response

HeaderValueSet byNotes
servercloudflarePlatformThe network that answered.
server-actualRTEdge.netPlatformThe product that served the response.
server-vendorElefunc, Inc. (https://elefunc.com) (https://efn.kr)PlatformYour own value for this header is replaced.
x-content-type-optionsnosniffPlatformObserved on every response checked. A wrong content-type therefore blocks scripts and styles instead of being guessed.
speculation-rules"/cdn-cgi/speculation"PlatformObserved on every response checked.

By host

Subdomains of rt.ht and custom domains differ in three headers.

HeaderValueHostsNotes
strict-transport-securitymax-age=31536000; includeSubDomains; preload*.rt.htCustom domains get none from the platform.
referrer-policyunsafe-url*.rt.htReplaces a Referrer-Policy that your worker sets. Custom domains get none from the platform.
edgeRTEdge.netCustom domainsReplaces the edge: o and edge: oF markers of pages and files, which you see only on *.rt.ht. Worker responses get it too.

Pages

The root document of a route, served at route/. It answers GET only.

HeaderValueSet byNotes
content-typetext/html;charset=utf-8RouterThe source view (?) uses the same type.
cache-controlno-storeRouterFreshness after a deploy comes from the platform, not from caching. See Freshness after a deploy.
access-control-allow-origin*RouterAny site may read the page with fetch().
edgeoRouterRTEdge.net on custom domains.
deployAn ISO time, such as 2026-10-04T12:00:00.000ZRouterThe time of the deploy. It changes with every deploy, even when the content is the same, and it is the time in the screenshot URL.

Your h:* attributes do not apply to the root document.

Exported files

A file exported with o:, served at route/name for any method.

HeaderValueSet byNotes
content-typeThe first of: your h:content-type, o:type, the type of the file extension, the type of a data: URL, then application/octet-stream for binary files or text/plain;charset=utf-8 for textRouterTypes taken from the extension carry no charset. See Content types.
edgeoFRouterRTEdge.net on custom domains.
deployAn ISO timeRouterThe time of the deploy.
cache-controlNoneYouAdd h:cache-control to cache a file.
Your h:* headersAs writtenYouAn attribute h:name=value on the exporting element adds the header name. Names are lower-case.
varySec-Fetch-DestRouterAdded to exported HTML pages. See HTML exports and the doctype.

Worker responses

What your worker returns for a /: URL or a fallback request.

HeaderValueSet byNotes
edge-workerfetch="<compile time>"; shell="<shell date>", host="CF:WfP"PlatformAdded to every response of the route's worker. fetch is the time the worker of that deploy was compiled, about a second after the deploy time of the page. shell is the date of the wrapper the worker was built with. Redeploy to get the current one.
deploy and edgeNot added-Custom domains still get Edge: RTEdge.net.
cache-controlAs you return itYour workerThe platform does not cache worker responses.
All other headersAs you return themYour workerExcept the headers listed under Platform headers win.

The pages in Error pages and status codes carry no edge-worker header.

Compression

Text, JavaScript, JSON, XML, SVG, font and WebAssembly responses are compressed with zstd, Brotli or gzip, and carry vary: accept-encoding. text/markdown is not on the list, so Markdown files are sent uncompressed.

In the playground

The playground output serves your exports with its own rules, so headers you set with h: behave differently while you edit.

HeaderPlaygroundRTEdge.net
content-typeChosen from o:type, the extension or the data: URL, and ;charset=utf-8 is added when it has no charset. Your h:content-type is replaced.Your h:content-type wins, and a type from the extension carries no charset.
cache-controlAlways no-store. Your h:cache-control is replaced.Yours, or none.
referrer-policyunsafe-urlunsafe-url on *.rt.ht.
origin-agent-cluster?1Not added.
edge, deploy, server-actual, server-vendorNot added.Added, as above.

Your other h:* headers are sent in the playground too.

Notes

Platform headers win

You cannot change server-actual or server-vendor, and on *.rt.ht you cannot change strict-transport-security or referrer-policy. An h:edge or h:deploy attribute is combined with the platform's value instead of replacing it.

Content types

The extensions below have a type of their own. Others, such as .webmanifest, .map, .yaml, .toml, .vtt and .jsx, are not in the table, so set their type with o:type.

ExtensionType
.htmltext/html
.csstext/css
.js, .mjstext/javascript
.jsonapplication/json
.mdtext/markdown
.svgimage/svg+xml
.txttext/plain
.wasmapplication/wasm
.xmlapplication/xml
.tsvideo/mp2t

The .ts row is not a typo: the table types the extension as MPEG transport streams, so set o:type on exported TypeScript files.

HTML exports and the doctype

An exported page is a text/html text body that does not start with <!doctype html. Every response for such a page carries Vary: Sec-Fetch-Dest. A navigation (Sec-Fetch-Dest is document, frame, iframe, embed, object or fencedframe) receives <!doctype html> in front of the page, and its content-length grows to match. A fetch() receives the page as it is, without the doctype. Exported pages get no generated social tags. text/html has no charset, so start each page with <meta charset=utf-8>, or set o:type="text/html;charset=utf-8".

CORS

Pages allow any origin. For a file, add h:access-control-allow-origin=*. A worker sets the CORS headers of its own responses and answers its own preflight requests.

Looking at headers

Use GET to see the headers of a page, because the root document does not answer HEAD. Exported files answer any method.

plain
curl -s -D - -o /dev/null https://name.rt.ht/
curl -sI https://name.rt.ht/.css

Setting headers on a file

On RTEdge.net, /.css answers text/css with cache-control: public, max-age=300, and /data.json answers application/json with access-control-allow-origin: *. In the playground the cache header is replaced by no-store, as the table above says.

html
<style o:=.css h:cache-control="public, max-age=300">
  body { font: 1rem/1.5 system-ui; color-scheme: light dark }
</style>
<script o:=data.json type=application/json h:access-control-allow-origin=*>
  {"hello": "world"}
</script>
<p><a href=data.json>data.json</a> and <a href=.css>.css</a></p>

See also