Signature
SCRIPT_URL, BASE_URL, ROUTE_PATH, ROUTE_PAGE, ROUTE_PATH_RAW, ROUTE_VALID, UCE_BIN_DIRECTORY
UCE populates several convenience request parameters before invoking page, component, CLI, custom HTTP, or WebSocket handlers:
context.params["SCRIPT_URL"]: canonical script URL, with/index.ucecollapsed to the containing directory URLcontext.params["BASE_URL"]: canonical directory URL for the scriptcontext.params["ROUTE_PATH"]: sanitized first keyless query-string segment, defaulting toindexwhen no route was suppliedcontext.params["ROUTE_PAGE"]: first segment ofROUTE_PATHcontext.params["ROUTE_PATH_RAW"]: normalized but not trusted route input, for diagnostics onlycontext.params["ROUTE_VALID"]:1when the supplied/defaulted route is safe,0when the supplied route was rejectedcontext.params["UCE_BIN_DIRECTORY"]: writable runtime cache directory fromBIN_DIRECTORY, useful for generated helper units or other request-local artifacts that must not be written into the source tree
ROUTE_PATH is safe to compose under an application-controlled route root. Unsafe route input such as .., ., empty interior segments, backslashes, dots in filenames, or other non route-segment characters is rejected by the runtime and yields an empty ROUTE_PATH with ROUTE_VALID=0.
These are useful for front-controller apps that use URLs like /?dashboard or /?workspace/projects while still accepting ordinary named query parameters.
Example
print(context.params["SCRIPT_URL"] != "" ? "has script url\n" : "request params available\n");
has script url