Skip to content

AccessCustomPage

Source: src/Cloudflare/Access/CustomPage.ts

A Cloudflare Zero Trust Access custom page. Replaces the default Access block pages (identity_denied / forbidden) with custom HTML, which can then be selected on an Access application.

Custom forbidden page

const page = yield* Cloudflare.AccessCustomPage("Forbidden", {
type: "forbidden",
customHtml: "<html><body><h1>Access denied</h1></body></html>",
});

Custom identity-denied page with an explicit name

const page = yield* Cloudflare.AccessCustomPage("Denied", {
name: "corp-identity-denied",
type: "identity_denied",
customHtml: "<html><body><h1>Who are you?</h1></body></html>",
});
const page = yield* Cloudflare.AccessCustomPage("Forbidden", {
type: "forbidden",
customHtml: "<html><body><h1>Still denied</h1></body></html>",
});