Default root object and custom 404 error response
Section titled “Default root object and custom 404 error response”This release introduces support for configuring a default root object and a custom 404 error response path, simplifying Single Page Application (SPA) and static website hosting on STACKIT CDN.
Default root object (defaultRootObject)
Section titled “Default root object (defaultRootObject)”- What’s new: Configure a default root object (for example,
index.htmlor/index.html) that the CDN fetches from your origin when an end user requests the root URL (/). - What it brings: Serves your entry document directly at
/without exposing raw bucket directory listings or requiring client-side redirects. - How to use it: Set
config.defaultRootObjectwhen creating or updating a distribution via the STACKIT CDN API.
Custom 404 error response (custom404ErrorResponse)
Section titled “Custom 404 error response (custom404ErrorResponse)”- What’s new: Configure a fallback origin path (for example,
/404.htmlor/index.html) that the CDN internally fetches and returns when your origin responds with an HTTP404 Not Foundstatus code. - What it brings: Enables custom error pages and client-side SPA routing for deep links (such as
/dashboard/settings) while keeping the requested URL unchanged in the browser. - How to use it: Set
config.custom404ErrorResponsewhen creating or updating a distribution via the STACKIT CDN API.