Включить CORS, KEDA - HttpTrigger - PullRequest
0 голосов
/ 06 февраля 2020

В моем ПО C я пытаюсь развернуть свою "Azure функцию - HttpTrigger" на AKS, используя KEDA. Пожалуйста, найдите deploy.yaml ниже. Мне нужно знать, как включить CORS, поэтому я не получаю ошибку CORS при доступе из моего приложения angular.

DEPLOY.YAML

data:
  AzureWebJobsStorage: ''
  FUNCTIONS_WORKER_RUNTIME: ZG90bmV0
apiVersion: v1
kind: Secret
metadata:
  name: helloworld
  namespace: ingress-nginx
---
apiVersion: v1
kind: Service
metadata:
  name: helloworld-http
  namespace: ingress-nginx
  annotations:
    osiris.deislabs.io/enabled: true
    osiris.deislabs.io/deployment: helloworld-http
spec:
  selector:
    app: helloworld-http
  ports:
  - protocol: TCP
    port: 80
    targetPort: 80
  type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloworld-http
  namespace: ingress-nginx
  labels:
    app: helloworld-http
  annotations:
    osiris.deislabs.io/enabled: true
    osiris.deislabs.io/minReplicas: 1
spec:
  replicas: 1
  selector:
    matchLabels:
      app: helloworld-http
  template:
    metadata:
      labels:
        app: helloworld-http
    spec:
      containers:
      - name: helloworld-http
        image: karthik3030/helloworld
        ports:
        - containerPort: 80
        env:
        - name: AzureFunctionsJobHost__functions__0
          value: helloworld
        envFrom:
        - secretRef:
            name: helloworld
---
...