Skip to content

+onCreatePageContext.server.js shouldn't trigger pageContext.json requests? #2937

@brillout

Description

@brillout

Description

I'd be nice if the mere existence of +onCreatePageContext.server.js doesn't trigger pageContext.json requests, see:

But it would break the authentication use case, see:

So far, the only solution I see it to create some new hook that is like onCreatePageContext (also called very early) but that triggers a pageContext.json request.

Using something like +data.pre.js (pre meaning order: 'pre') wouldn't work for the authentication use case because +guard (and potentially other hooks) needs auth information.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions