i get a 400 bad request error "Your browser sent an invalid request." when i want to reach my website. Here is the error i get in the console :
My server code :
import { Application} from "https://deno.land/x/oak@v12.1.0/mod.ts";
import { send } from "https://deno.land/x/oak@v11.1.0/send.ts";
import { viewEngine, ejsEngine, oakAdapter } from "https://deno.land/x/view_engine@v10.5.1/mod.ts";
import router from './routes.ts';
const port = Deno.env.get("PORT") || 4000
const app = new Application()
app.use(viewEngine(oakAdapter, ejsEngine));
app.use(router.routes());
app.use(router.allowedMethods());
app.use(async(ctx,next) => {
await send(ctx,ctx.request.url.pathname,{
root: `${Deno.cwd()}`
});
next();
});
try{
console.log(`Server running on port ${port}`);
await app.listen({port, certFile: "./sites/vainastar.com/vainastar.com-2023-03-27.crt", keyFile:"./sites/vainastar.com/vainastar.com-2023-03-27.key", alpnProtocols: ["h2", "http/1.1"],secure:true});
}catch(e) {
console.log("there is an error");
console.log(e);
}
I added alpnprotocols option but no changes, i'll try to reload the cache too ... is anyone know what this error can be about ?
i'm reading this old discussion from github, i think my issue could be related to what they have been through with Deno ... And SSL certs. I think that i must use a proxy for requests or switch to node.js :(