kubernetes cors errror with oauth2 reverse proxy

Viewed 148

I am facing an issue with kubernetes oauth2-proxy CORS policy. My setup:

ingress:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
 name: supervisor-ingress
 namespace: management
 annotations:
   kubernetes.io/ingress.class: nginx
   cert-manager.io/cluster-issuer: letsencrypt-staging
   nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth"
   nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri"

oauth2 proxy ingress:

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: oauth2-proxy
  namespace: default
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:

I am running react application on localhost

I strongly believe that this issue is oauth proxy related as disabling auth-url works fine. I have tried multiple headers and cors policies, but it seems they are not applied to oauth proxy

response message:

Access to XMLHttpRequest at '' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
0 Answers
Related