Skip to content

Commit 93ff899

Browse files
committed
fix cors
1 parent cb69d53 commit 93ff899

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

containers/aggregator/services/create-service.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ func createDeployment(service *model.Service, replicas int32, useUMA bool, ctx c
274274
return nil
275275
}
276276

277-
278277
func createServiceResource(service *model.Service, ctx context.Context) error {
279278
svcName := "svc-" + service.Id
280279

@@ -345,7 +344,7 @@ func createIngressRoute(service *model.Service, owner model.User, ctx context.Co
345344
middlewares := []interface{}{
346345
map[string]interface{}{
347346
"name": "cors",
348-
"namespace": namespace,
347+
"namespace": "aggregator-app",
349348
},
350349
}
351350
if useUMA {

k8s/app/traefik-config.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ metadata:
3737
namespace: aggregator-app
3838
spec:
3939
headers:
40-
accessControlAllowOriginList:
40+
accessControlAllowOriginList:
4141
- "*"
4242
accessControlAllowMethods:
4343
- GET
@@ -49,5 +49,7 @@ spec:
4949
- OPTIONS
5050
accessControlAllowHeaders:
5151
- "*"
52+
accessControlExposeHeaders:
53+
- "*"
5254
accessControlMaxAge: 86400
5355
accessControlAllowCredentials: false

0 commit comments

Comments
 (0)