Revert "make use of SSL certificates"
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m23s

This reverts commit e39797cf49.

HTTPS on deno is not bad, but if you are handling a lot of connections, you are better off using a well tested reverse proxy like haproxy and nginx. They are more efficient at handling HTTPS traffic.
This commit is contained in:
Fijxu 2025-02-23 16:58:28 -03:00
parent 24eafee3e9
commit 2a37c1fe53
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
2 changed files with 5 additions and 18 deletions

View file

@ -22,7 +22,7 @@ RUN curl -fsSL https://github.com/krallin/tini/releases/download/v${TINI_VERSION
RUN deno task compile
# Stage for creating the non-privileged user
FROM i.sanxian.tech/alpine:3.20 AS user-stage
FROM alpine:3.20 AS user-stage
RUN adduser -u 10001 -S appuser

View file

@ -244,20 +244,7 @@ app.use("*", async (c, next) => {
routes(app, konfigStore);
const https = Deno.env.get("HTTPS");
if (https == "TRUE" || https == "true") {
const cert = Deno.readTextFileSync("/data/cert.pem");
const key = Deno.readTextFileSync("/data/key.key");
Deno.serve({
port: port,
hostname: host,
cert: cert,
key: key,
}, app.fetch);
} else {
Deno.serve({
port: port,
hostname: host,
}, app.fetch);
}
Deno.serve({
port: Number(port),
hostname: host
}, app.fetch);