Forum Discussion
kouriada_284551
Nimbostratus
Oct 03, 2018Access-control-allow-origin changing according domains
Hi guys,
I would like to ask about your help.
I have to apply multiple Access-control-allow-origin for particular domains via irule
Description of the task is something like thi...
kouriada_284551
Nimbostratus
Oct 03, 2018Hi,
client will come from particular web page( where will be login page into source web page), so I can determine that according particular fqdn of that domainA or B
I have been thinking that I could solve that like this: *.domainA, *.domainB and add those *.domains to Data groupe list and write something like this: if { ! [class match $act_uri contains allow_domains] and that the particular domain will be added to Access-Control-Allow-Origin *.domainA or *.domainB according client comes from
or just write it down into couple simple irules, theoreticaly:
*for .domainA:
http:Request
if http: host equal domainA
than
http response:
http:header Access-Control-Allow-Origin domainA<>br
*for .domainB:
http:Request
if http: host equal domainA
than
http response:
http:header Access-Control-Allow-Origin domainA<>br
etc
make it sense?
I am not strong enough in writing of irules
AK
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects