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
demandé il y a 3 ans2375 vues
2 réponses
0

Did you ever find an answer to this?

répondu il y a 3 ans
0

Facing the same issue.

répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions