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

setting HTTPS #13

Open
tomekrozalski opened this issue Sep 22, 2021 · 0 comments
Open

setting HTTPS #13

tomekrozalski opened this issue Sep 22, 2021 · 0 comments

Comments

@tomekrozalski
Copy link

Is there any way to set up SSL, HTTPS? I noticed that when I try to set cookies with secure: true, Deno complains: "Cannot send secure cookie over unencrypted connection". I have Heroku SSL Certificate, but that is not enough. Apparently Deno needs to be run like:

import { Application } from "oak";

const app = new Application();

await app.listen({
  port: Number(Deno.env.get("PORT")),
  secure: true,
  certFile: Deno.env.get("SSL_CERTIFICATE") as string,
  keyFile: Deno.env.get("SSL_PRIVATE_KEY") as string,
  alpnProtocols: ["h2", "http/1.1"],
});

I even tried that, I added my SSL certificate to .env, but it still does not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant