Skip to main content

Hard flags

This is the ordinary version of this page. A beta hard flag is declared in next.config.ts; a request carrying the right cookie is rewritten into a beta/ directory beside every page, and this page has a version there.

Joining writes the cookie and refreshes. The same address then serves the other file — look for the framed panel.

What a visitor cannot do

The beta page lives at /en/-/-/beta/demos/hard-flags internally, but /beta/demos/hard-flags is a 404, with the cookie or without: a public path starting with a hard flag's name is quarantined before the segment is injected. The value itself is matched in the rewrites, on the server; this demo has to write it from the browser, which an app never would.

Inspector

Address bar
/en/-/-/demos/hard-flags
Rendered as
/en/-/-/-/-/demos/hard-flags
Locale
en
Preferences
{}
Flags
{}