Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etag middleware does not work in deploy #437

Open
KyleJune opened this issue Dec 13, 2021 · 1 comment
Open

etag middleware does not work in deploy #437

KyleJune opened this issue Dec 13, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@KyleJune
Copy link

My deployment wasn't serving any static files. The route I was going to uses the etag.factory(), then the matching route was just setting the body to "Hello world!". Locally it works fine and adds the etag but in deploy I got the following error.

Uncaught error TypeError: Right-hand side of 'instanceof' is not an object
    at getEntity (https://deno.land/x/oak@v10.0.0/etag.ts:33:14)
    at etag (https://deno.land/x/oak@v10.0.0/etag.ts:77:34)
@KyleJune
Copy link
Author

Reproduction path:

import { Application, etag } from "https://deno.land/x/oak@v10.0.0/mod.ts";

const app = new Application();

app.use(etag.factory());

// Hello World!
app.use((ctx) => {
  ctx.response.body = "Hello World!";
});

await app.listen({ port: 8000 });

https://dash.deno.com/playground/fresh-cow-68

@kitsonk kitsonk added the bug Something isn't working label Dec 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants