Skip to content

Guarded / private prerender remote functions #15712

@Stadly

Description

@Stadly

Describe the problem

I’d like to prerender data at build time without exposing it via a public endpoint.

Currently, prerender remote functions appear to always generate publicly callable HTTP endpoints, even if they are only used internally (e.g., only referenced from guarded remote functions and never directly from the client). This makes it impossible to safely prerender sensitive or restricted data.

Examples:

  • An admin‑only “System Info” page showing build metadata (build time, branch, commit hash, etc.) that should only be visible to administrators.
  • A course platform where course content is prerendered for performance, but access to the content must stay behind a paywall and only be available to paying users.

Describe the proposed solution

I would like support for guarded or non‑public prerender functions. For example:

  • The ability to declare a prerender remote function as:
    • Authenticated / role‑protected, so that access is checked when it’s called, or
    • Internal/private, so no public HTTP endpoint is generated at all.
  • These functions should still:
    • Run at build time to compute and cache their data, and
    • Be callable from other (guarded) remote functions or server‑side logic.

This would allow us to combine the performance and stability of prerendering with proper access control for admin‑only and paywalled content.

Alternatives considered

No response

Importance

would make my life easier

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions