Skip to content

Commit

Permalink
fix(redirection): provide additional intermediate ca certs (#123)
Browse files Browse the repository at this point in the history
* fixed code path for invalid certs

* add additional ca pems to https agents
  • Loading branch information
argl authored Dec 4, 2024
1 parent bd74656 commit 0200be8
Show file tree
Hide file tree
Showing 6 changed files with 1,074 additions and 545 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:20

RUN apt-get -y update && \
apt-get install -y git && \
mkdir -p /home/node/app/node_modules && \
chown -R node:node /home/node/app
apt-get install -y git && \
mkdir -p /home/node/app/node_modules && \
chown -R node:node /home/node/app

WORKDIR /home/node/app
USER node
Expand All @@ -13,5 +13,6 @@ RUN npm install
# Get the current HSTS list
RUN npm run updateHsts

ENV NODE_EXTRA_CA_CERTS=node_modules/extra_certs/ca_bundle/ca_intermediate_root_bundle.pem
EXPOSE 8080
CMD [ "node", "src/api/index.js" ]
3 changes: 3 additions & 0 deletions bin/wrapper.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
export NODE_EXTRA_CA_CERTS=node_modules/node_extra_ca_certs_mozilla_bundle/ca_bundle/ca_intermediate_root_bundle.pem
exec node bin/scan.js "$@"
Loading

0 comments on commit 0200be8

Please sign in to comment.