From 8a15e4a5d57859737400f3b60b24a65c062ae5ee Mon Sep 17 00:00:00 2001 From: Theo Sanderson Date: Tue, 28 Nov 2023 13:31:04 +0000 Subject: [PATCH 1/2] update --- proxy/kube.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/proxy/kube.yml b/proxy/kube.yml index 073dcb20..40dad5df 100644 --- a/proxy/kube.yml +++ b/proxy/kube.yml @@ -15,6 +15,7 @@ spec: containers: - name: taxonium-proxy image: theosanderson/taxonium_proxy:master + imagePullPolicy: Always ports: - containerPort: 3000 @@ -48,4 +49,8 @@ spec: service: name: taxonium-proxy-service port: - number: 80 \ No newline at end of file + number: 80 + tls: + - hosts: + - proxy2.taxonium.org + secretName: tls-proxy \ No newline at end of file From 5b23650b691ceb65e0b5e630e1cb46da9c0e7cbb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 28 Nov 2023 13:31:32 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- proxy/kube.yml | 40 ++++++++++++++++++++-------------------- proxy/server.js | 1 - 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/proxy/kube.yml b/proxy/kube.yml index 40dad5df..d3b8d326 100644 --- a/proxy/kube.yml +++ b/proxy/kube.yml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: taxonium-proxy-deployment spec: - replicas: 1 # Number of replicas + replicas: 1 # Number of replicas selector: matchLabels: app: taxonium-proxy @@ -13,11 +13,11 @@ spec: app: taxonium-proxy spec: containers: - - name: taxonium-proxy - image: theosanderson/taxonium_proxy:master - imagePullPolicy: Always - ports: - - containerPort: 3000 + - name: taxonium-proxy + image: theosanderson/taxonium_proxy:master + imagePullPolicy: Always + ports: + - containerPort: 3000 --- apiVersion: v1 @@ -37,20 +37,20 @@ kind: Ingress metadata: name: taxonium-proxy-ingress annotations: - kubernetes.io/ingress.class: "nginx" # assuming you are using nginx ingress controller + kubernetes.io/ingress.class: "nginx" # assuming you are using nginx ingress controller spec: rules: - - host: proxy2.taxonium.org - http: - paths: - - pathType: Prefix - path: "/" - backend: - service: - name: taxonium-proxy-service - port: - number: 80 + - host: proxy2.taxonium.org + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: taxonium-proxy-service + port: + number: 80 tls: - - hosts: - - proxy2.taxonium.org - secretName: tls-proxy \ No newline at end of file + - hosts: + - proxy2.taxonium.org + secretName: tls-proxy diff --git a/proxy/server.js b/proxy/server.js index ab5d3837..356fcb31 100644 --- a/proxy/server.js +++ b/proxy/server.js @@ -22,7 +22,6 @@ const corsOptions = { //app.use(cors(corsOptions)); - // Rate limiting middleware const limiter = rateLimit({ windowMs: 15 * 60 * 1000, // 15 minutes