我正在处理的应用程序出现了CORS问题。
It's setup in Kubernetes, with a third party Java framework:
http://www.ninjaframework.org/
I am getting the following error:
Preflight response is not successful
XMLHttpRequest cannot load https://api.domain.com/api/v1/url/goes/here? due to access control checks.
Failed to load resource: Preflight response is not successful
Run Code Online (Sandbox Code Playgroud)
I don't think the problem is in Kubernetes, but just in case - here's my Kubernetes setup:
apiVersion: v1
kind: Service
metadata:
name: domain-server
annotations:
dns.alpha.kubernetes.io/external: "api.domain.com"
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:us-east-2:152660121739:certificate/8efe41c4-9a53-4cf6-b056-5279df82bc5e
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
spec:
type: LoadBalancer
selector:
app: domain-server
ports:
- …Run Code Online (Sandbox Code Playgroud)