diff --git a/Dockerfile b/Dockerfile index 2e97b7b..d979863 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-alpine AS build +FROM node:26-alpine AS build WORKDIR /app COPY . /app @@ -19,7 +19,7 @@ RUN set -ex \ && chown -R node:node /app \ && chmod +r /app/testpk.pem -FROM node:22-alpine AS final +FROM node:26-alpine AS final LABEL \ org.opencontainers.image.title="http-https-echo" \ org.opencontainers.image.description="Docker image that echoes request data as JSON; listens on HTTP/S, with various extra features, useful for debugging." \ diff --git a/index.js b/index.js index c75d5b6..b331a1d 100644 --- a/index.js +++ b/index.js @@ -176,7 +176,7 @@ app.all('/{*splat}', (req, res) => { } //Delay the response for a user defined time - const sleepTime = parseInt(req.headers["x-set-response-delay-ms"] || req.query["x-set-response-delay-ms"], 0) + const sleepTime = parseInt(req.headers["x-set-response-delay-ms"] || req.query["x-set-response-delay-ms"]) || 0; sleep(sleepTime).then(() => { //Set the response content type to what the user wants