Skip to content

Commit

Permalink
add cors middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed Oct 22, 2024
1 parent 738cd3e commit 387aa0a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
15 changes: 15 additions & 0 deletions charts/tracetest-public-endpoint/templates/cors_middleware.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: {{ .Release.Name }}-cors-allowed
namespace: default
spec:
headers:
accessControlAllowHeaders:
- '*'
accessControlAllowMethods:
- '*'
accessControlAllowOriginList:
- '*'
accessControlMaxAge: 100
addVaryHeader: true
2 changes: 2 additions & 0 deletions charts/tracetest-public-endpoint/templates/ingressroute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ spec:
routes:
- kind: Rule
match: Host(`{{ .Values.global.urls.otlpingest.hostname }}`) && PathPrefix(`/opentelemetry.proto.collector.trace.v1.TraceService/Export`)
middlewares:
- {{ .Release.Name }}-cors-allowed
services:
- kind: Service
name: {{ .Release.Name }}-public-endpoint-otel-collector
Expand Down

0 comments on commit 387aa0a

Please sign in to comment.