diff --git a/deploy/k8s/overlays/jax-cluster-dev-10--dev/ingress.yaml b/deploy/k8s/overlays/jax-cluster-dev-10--dev/ingress.yaml index 920b443..30908a6 100644 --- a/deploy/k8s/overlays/jax-cluster-dev-10--dev/ingress.yaml +++ b/deploy/k8s/overlays/jax-cluster-dev-10--dev/ingress.yaml @@ -9,6 +9,15 @@ metadata: cert-manager.io/cluster-issuer: "letsencrypt-prod" nginx.ingress.kubernetes.io/auth-url: "http://oauth2-proxy.oauth2-proxy.svc.cluster.local/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://auth.jax-cluster-dev-10.jax.org/oauth2/start?rd=https://$http_host$escaped_request_uri" + nginx.ingress.kubernetes.io/cors-allow-credentials: "true" + nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" + nginx.ingress.kubernetes.io/cors-allow-methods: "DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT" + nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.jax.org, http://localhost:4200, http://localhost:8080" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/auth-snippet: | + if ($request_method = "OPTIONS") { + return 202; + } spec: ingressClassName: nginx tls: diff --git a/deploy/k8s/overlays/jax-cluster-dev-10--sqa/ingress.yaml b/deploy/k8s/overlays/jax-cluster-dev-10--sqa/ingress.yaml index 03a712e..0c54698 100644 --- a/deploy/k8s/overlays/jax-cluster-dev-10--sqa/ingress.yaml +++ b/deploy/k8s/overlays/jax-cluster-dev-10--sqa/ingress.yaml @@ -9,6 +9,15 @@ metadata: cert-manager.io/cluster-issuer: "letsencrypt-prod" nginx.ingress.kubernetes.io/auth-url: "http://oauth2-proxy.oauth2-proxy.svc.cluster.local/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://auth.jax-cluster-dev-10.jax.org/oauth2/start?rd=https://$http_host$escaped_request_uri" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/cors-allow-credentials: "true" + nginx.ingress.kubernetes.io/cors-allow-methods: "DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT" + nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" + nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.jax.org" + nginx.ingress.kubernetes.io/auth-snippet: | + if ($request_method = "OPTIONS") { + return 202; + } spec: ingressClassName: nginx tls: diff --git a/deploy/k8s/overlays/jax-cluster-prod-10--prod/ingress.yaml b/deploy/k8s/overlays/jax-cluster-prod-10--prod/ingress.yaml index b73be1f..68af2c4 100644 --- a/deploy/k8s/overlays/jax-cluster-prod-10--prod/ingress.yaml +++ b/deploy/k8s/overlays/jax-cluster-prod-10--prod/ingress.yaml @@ -7,6 +7,11 @@ metadata: # so that you don't hit the rate limit for the production issuer. # cert-manager.io/cluster-issuer: "letsencrypt-staging" cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/cors-allow-credentials: "true" + nginx.ingress.kubernetes.io/cors-allow-methods: "DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT" + nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" + nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.jax.org" spec: ingressClassName: nginx tls: @@ -25,7 +30,7 @@ spec: path: "/api" backend: service: - name: geneweaver-legacy + name: geneweaver-api port: number: 8000 - host: "geneweaver.jax.org" @@ -55,7 +60,7 @@ spec: path: "/api" backend: service: - name: geneweaver-legacy + name: geneweaver-api port: number: 8000 - host: "classic.geneweaver.org" @@ -65,6 +70,6 @@ spec: path: "/api" backend: service: - name: geneweaver-legacy + name: geneweaver-api port: number: 800 \ No newline at end of file diff --git a/deploy/k8s/overlays/jax-cluster-prod-10--stage/ingress.yaml b/deploy/k8s/overlays/jax-cluster-prod-10--stage/ingress.yaml index 9c28f33..932b8cc 100644 --- a/deploy/k8s/overlays/jax-cluster-prod-10--stage/ingress.yaml +++ b/deploy/k8s/overlays/jax-cluster-prod-10--stage/ingress.yaml @@ -9,6 +9,15 @@ metadata: cert-manager.io/cluster-issuer: "letsencrypt-prod" nginx.ingress.kubernetes.io/auth-url: "http://oauth2-proxy.oauth2-proxy.svc.cluster.local/oauth2/auth" nginx.ingress.kubernetes.io/auth-signin: "https://auth.jax-cluster-prod-10.jax.org/oauth2/start?rd=https://$http_host$escaped_request_uri" + nginx.ingress.kubernetes.io/enable-cors: "true" + nginx.ingress.kubernetes.io/cors-allow-credentials: "true" + nginx.ingress.kubernetes.io/cors-allow-methods: "DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT" + nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" + nginx.ingress.kubernetes.io/cors-allow-origin: "https://*.jax.org" + nginx.ingress.kubernetes.io/auth-snippet: | + if ($request_method = "OPTIONS") { + return 202; + } spec: ingressClassName: nginx tls: diff --git a/pyproject.toml b/pyproject.toml index a4bdd1f..88c328b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "geneweaver-api" -version = "0.8.0" +version = "0.8.1a0" description = "The Geneweaver API" authors = [ "Alexander Berger ",