fix: ctx.render headers not working (#1927)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import type { Handlers } from "$fresh/server.ts";
|
||||
|
||||
export const handler: Handlers<unknown, unknown> = {
|
||||
GET(_, ctx) {
|
||||
const headers = {
|
||||
"x-foo": "Hello world!",
|
||||
};
|
||||
return ctx.render(undefined, { headers });
|
||||
},
|
||||
};
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div>
|
||||
Should have <code>X-Foo</code> header set.
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user