CORS issue after attaching WAF to ALB

0

Hi there,
The problem is next:
When I associate WAF with ALB I received an error in the browser console:
The request has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Without WAF everything is ok.
WAF ACL rule:
{
"Name": "HEADER-VERIFICATION",
"Priority": 0,
"Action": {
"Allow": {}
},
"VisibilityConfig": {
"SampledRequestsEnabled": true,
"CloudWatchMetricsEnabled": true,
"MetricName": "MyCustmomHeaderRule"
},
"Statement": {
"ByteMatchStatement": {
"FieldToMatch": {
"SingleHeader": {
"Name": "my_custom_header"
}
},
"PositionalConstraint": "EXACTLY",
"SearchString": "my_serching_string",
"TextTransformations": [
{
"Type": "NONE",
"Priority": 0
}
]
}
}
}

asobko
gefragt vor 3 Jahren2375 Aufrufe
2 Antworten
0

Did you ever find an answer to this?

beantwortet vor 3 Jahren
0

Facing the same issue.

beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen