Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Cross-Origin Resource Sharing configuration Issue in Apache |
|
Author |
|
nparikh
Joined: 26 Nov 2014 Posts: 1 Location: IN
|
Posted: Wed 26 Nov '14 19:13 Post subject: Cross-Origin Resource Sharing configuration Issue in Apache |
|
|
We have following rule in httpd-vhosts.conf and it was working all ok.
All of sudden we have found on one day that it stopped working and we did some configuration tweak with this rule but none of them worked.
During troubleshooting, last change was disabling mod_security and after that it started working again. However, next day we had again enabled mod_security to get issue replicated but found it working all ok.
Anyone has any clue for such behaviour of Apache ? Why all of sudden following working rule may get stopped working and then starts working again ?
<IfModule mod_headers.c>
SetEnvIf Origin "https://(www\.)?(v1.abc.com|v1ak.abc.com|v2.asite.com)$" AccessControlAllowOrigin=$0$1
Header Set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header Set Access-Control-Allow-Credentials "true"
Header Set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header Set Access-Control-Allow-Headers "origin, content-type, accept, X-Requested-With"
Header always unset Expires
</IfModule>
OS and Apache Version details are below:
Apache Version :2.2.27(win32), OS: Windows 2008 R2, ModSecurity Rule Set ver.1.5 |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Sat 17 Jan '15 23:35 Post subject: |
|
|
You should enable the mod security log to find out which rules is a false positive. |
|
Back to top |
|
|
|
|
|
|