Skip to content

Support Cloudflare #33

Open
Open
@bogeychan

Description

@bogeychan

The following code doesn't work on Cloudflare because dynamic is false

const jwtType = t.Object({
  id: t.Number(),
});

export const authPlugin = new Elysia({ name: "authPlugin" }).use(
  jwt({
    secret: "yay",
    name: "jwt",
    exp: "20m",
    schema: jwtType,
  })
);

This function call missing dynamic parameter:

? getSchemaValidator(

Cloudflare error:

EvalError: Code generation from strings disallowed for this context

reported on discord

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions