Skip to content

Can't set Response headers of a page in Fresh 2, what am I doing wrong? #3445

@DANser-freelancer

Description

@DANser-freelancer

In ./routes/admin-panel.jsx

export const handler = define.handlers({
  GET() {
    return ({
      data: {},
      status: 200,
      headers: LoadAdminPanel,
    });
  },
});

export default define.page<typeof handler>(() => {
  return <AdminPanel />;
});

This is supposed to render <AdminPanel /> JSX and give it to the browser with LoadAdminPanel headers, so why does it not have those headers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions