16-Aug-2021 07:28
Hello All,
Hope you all doing good. Wondering if you would have a answer for to a CORS issue.
I am trying to disable CORS for an web app that we have published and we can see it is failing to load because of CROS error.
I even tried disabling ASM policy from the virtual server , still getting the CROS error on the browser.
I am trying to figure out if the iRule for disabling CORS will work or not. However, when i create the irule mentioned in the article (https://devcentral.f5.com/s/articles/cors-implementation) I get an error on F5 .
Is there an issue with allowed_origins as class ,since i get the error :
01070151:3: Rule [/Common/Allowed_CROS] error: /Common/Allowed_CROS:2: error: [command is not valid in the current scope][class allowed_origins {
".example.com"
".example2.com"
".goodpartner.com"
}]
15-Sep-2021 06:33
you should remove this text from your irule:
^-this was an example of a datagroup called "allowed_origins" which you should create (easiest way is to do it via the F5 GUI):
Local Traffic -> iRules->DataGroups and instead of ".example.com" you should put your domain (mind the first dot which is needed in this case)