I have a IngressRoute + CORS Middleware like that ...
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: my-route
namespace: default
spec:
entryPoints:
- web
routes:
- kind: Rule
match: 'PathPrefix(`/my-path`)'
middlewares:
- name: cors-allowed
services:
- name: my-service
port: http
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: cors-allowed
namespace: default
spec:
headers:
accessControlAllowHeaders:
- '*'
accessControlAllowMethods:
- '*'
accessControlAllowOriginList:
- '*'
accessControlMaxAge: 100
addVaryHeader: true
Is it possible to link the middleware without declare the middleware.name: cors-allowed
?
Or others
Is it possible to configure a global middleware for every IngressRoute?
Thanks for any hint.
Jan