CORS implementation
Problem this snippet solves: Pretty self-explanatory - we had to implement CORS (Cross-Origin-Resource-Sharing) where we had multiple domains, all of which had to be able to make AJAX calls to API's...
Published Nov 03, 2015
Version 1.0Rory_Hewitt_F5_
Cirrus
Joined May 05, 2019
Rory_Hewitt_F5_
Cirrus
Joined May 05, 2019
Tom_L
Nimbostratus
Apr 23, 2020I stopped trying to use class, and tried to utilize the Data group object with the recommended class match brackets, but keep getting the error below when I try to Update/Save the iRule.
01070151:3: Rule [/Common/CORS-Response-Header-iRule] error: /Common/CORS-Response-Header-iRule:1: error: [undefined procedure: ltm][ltm data-group internal DG-CORS-ALLOWED-ORIGINS {
records {
.XXXXXXXX.com { }
localhost:443 { }
}
type string
}]
Version BIG-IP 14.1.2.3 Build 0.0.5 Release 3