0.0.49 • Published 1 year ago
@hattip/adapter-fastly v0.0.49
@hattip/adapter-fastly
Hattip adapter for Fastly.
Usage
Assuming you have your Hattip handler defined in handler.js, create an entry file like the following:
import fastlyAdapter from "@hattip/adapter-fastly";
import handler from "./handler.js";
export default fastlyAdapter(handler);Static assets
To serve static assets, scaffold a project with Fastly Static Publisher. Put your Hattip handler in src/handler.js and replace src/index.js with the following:
import fastlyAdapter from "@hattip/adapter-fastly";
import handler from "./handler.js";
import { getServer } from "./statics.js";
const staticContentServer = getServer();
export default fastlyAdapter(async (ctx) => {
const response = await staticContentServer.serveRequest(ctx.request);
if (response != null) {
return response;
}
return handler(ctx);
});context.platform
export interface FastlyPlatformInfo {
/** Platform name */
name: "fastly-compute";
/** Event object */
event: FetchEvent;
}Limitations
- Fastly doesn't support constructing a
Requestobject with a stream body. - Fastly doesn't support the
AES-GCMcrypto algorithm used by@hattip/session'sEncryptedCookieStore.
0.0.49
1 year ago
0.0.46
2 years ago
0.0.47
1 year ago
0.0.48
1 year ago
0.0.45
2 years ago
0.0.44
2 years ago
0.0.43
2 years ago
0.0.42
2 years ago
0.0.41
2 years ago
0.0.40
2 years ago
0.0.39
2 years ago
0.0.38
2 years ago
0.0.36
2 years ago
0.0.37
2 years ago
0.0.35
2 years ago
0.0.35-canary.7
2 years ago
0.0.35-canary.2
2 years ago
0.0.35-canary
2 years ago