You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 10, 2025. It is now read-only.
CORS not working after enabling page speed on Apache #2080
I have two subdomains one is app.example.com and the other is api.example.com after enabling the page speed module the app can not any endpoint to API from the browser. If the disabled the module it works. The page speed module config is already shown above.
And these urls are rewrited by pagespeed?
No, nothing like, I shared if I have to somethings to make it work.
Have you the content-security-policy header in place?
No
What error have you in the browser console?
Access to XMLHttpRequest at 'http://api.example.com/login' from origin 'http://app.example.com' 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.
Hi
I have found a issue #1794 seems is like yours.
These issue have no responses, so I don´t know if the user has solved this but you may ask to the user @tuananhzippy about it.
In this issue the headers set by ModPagespeedAddResourceHeader are not added.
See the issue #1760 and try changin the ModPagespeedAddResourceHeade directives with the apache config: Header setifempty Access-Control-Allow-Origin <MY_ORIGIN>
Activity
Lofesa commentedon Sep 8, 2021
And what is your CROS issue?
fahadabid commentedon Sep 9, 2021
I have two subdomains one is app.example.com and the other is api.example.com after enabling the page speed module the app can not any endpoint to API from the browser. If the disabled the module it works. The page speed module config is already shown above.
Lofesa commentedon Sep 9, 2021
And these urls are rewrited by pagespeed?
Have you the content-security-policy header in place?
What error have you in the browser console?
fahadabid commentedon Sep 9, 2021
And these urls are rewrited by pagespeed?
No, nothing like, I shared if I have to somethings to make it work.
Have you the content-security-policy header in place?
No
What error have you in the browser console?
Access to XMLHttpRequest at 'http://api.example.com/login' from origin 'http://app.example.com' 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.
Lofesa commentedon Sep 10, 2021
Hi
I have found a issue #1794 seems is like yours.
These issue have no responses, so I don´t know if the user has solved this but you may ask to the user @tuananhzippy about it.
In this issue the headers set by ModPagespeedAddResourceHeader are not added.
See the issue #1760 and try changin the ModPagespeedAddResourceHeade directives with the apache config:
Header setifempty Access-Control-Allow-Origin <MY_ORIGIN>