forked from epesooj/webring
Move to Deno+Bunny.net, add a way to test webring locally.
This commit is contained in:
parent
9f66f0b37b
commit
8670aa3412
33 changed files with 599 additions and 3360 deletions
16
bunny/webring.ts
Normal file
16
bunny/webring.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import * as BunnySDK from '@bunny.net/edgescript-sdk';
|
||||
import { handleFunctions } from '../src/main.ts';
|
||||
|
||||
BunnySDK.net.http
|
||||
.servePullZone({ url: 'https://akols.com' })
|
||||
.onOriginRequest(
|
||||
(ctx: { request: Request }): Promise<Request> | Promise<Response> => {
|
||||
const funcResp = handleFunctions(ctx.request);
|
||||
|
||||
if (funcResp !== undefined) {
|
||||
return Promise.resolve(funcResp);
|
||||
}
|
||||
|
||||
return Promise.resolve(ctx.request);
|
||||
}
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue