Help resolve Apache Access-Control-Allow-Origin header setting issue
- or -
Post a project like this2556
£20(approx. $25)
- Posted:
- Proposals: 3
- Remote
- #1523849
- Awarded
Description
Experience Level: Expert
General information for the business: Websites
Description of requirements/functionality: Looking for some help debugging an issue I have with an htaccess file on Apache on Ubuntu16.04 server in Amazon Cloud.
I am getting CORS errors in browsers trying access font files cross domain. The error I get in Chrome is:
blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I know how to correct this and have applied the htaccess file below on both my shared hosting environment running LAMP and also WAMPserver on my laptop (Instead of DOMAIN the original file shows the domain hosting the font files). Both work fine but I simply cannot get Apache on my cloud server to recognise the Access-Control-Allow-Origin command.
# Allow access from all domains for webfonts, stylesheets, javascript, contentbuilder html snippets file
Header set Access-Control-Allow-Origin "DOMAIN"
I have checked mod_headers is switched on and it is. I’ve also ensured this command is permitted in the Apache conf file but adding:
AllowOverride All
I have also tried adding the actual Access-Control-Allow-Origin to the directory section in the conf file, restarting Apache and see if it will pick it up from there. It won’t.
I also tried corrupting the htaccess file of the code within in by removing close tag commands etc to see if the htaccess file is actually being picked up. If done in the conf file Apache wont restart and if done in the htaccess file the website wont serve. Thus I presume the htaccess file is being picked up. Thus leads me to believe there is something supressing that particular command or alternatively I am pissing something blindingly obvious.
I have also tried changing the domain in the htaccess file. When I do this in my other environments the error I get relates to the fact that the directive has been found but the domain given permission isn’t the domain making the read therefore CORS blocks.
Looking for someone with good Apache and Ubuntu experience to help me resolve ideally by email or alternatively can share screen. No server access can be granted unfortunately. Can share more details when job awarded. This is a small item of work hence priced accordingly.
See uploaded word document (if PPH removes any of the code snippets from this description)
OS requirements: Linux
Extra notes:
Description of requirements/functionality: Looking for some help debugging an issue I have with an htaccess file on Apache on Ubuntu16.04 server in Amazon Cloud.
I am getting CORS errors in browsers trying access font files cross domain. The error I get in Chrome is:
blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I know how to correct this and have applied the htaccess file below on both my shared hosting environment running LAMP and also WAMPserver on my laptop (Instead of DOMAIN the original file shows the domain hosting the font files). Both work fine but I simply cannot get Apache on my cloud server to recognise the Access-Control-Allow-Origin command.
# Allow access from all domains for webfonts, stylesheets, javascript, contentbuilder html snippets file
Header set Access-Control-Allow-Origin "DOMAIN"
I have checked mod_headers is switched on and it is. I’ve also ensured this command is permitted in the Apache conf file but adding:
AllowOverride All
I have also tried adding the actual Access-Control-Allow-Origin to the directory section in the conf file, restarting Apache and see if it will pick it up from there. It won’t.
I also tried corrupting the htaccess file of the code within in by removing close tag commands etc to see if the htaccess file is actually being picked up. If done in the conf file Apache wont restart and if done in the htaccess file the website wont serve. Thus I presume the htaccess file is being picked up. Thus leads me to believe there is something supressing that particular command or alternatively I am pissing something blindingly obvious.
I have also tried changing the domain in the htaccess file. When I do this in my other environments the error I get relates to the fact that the directive has been found but the domain given permission isn’t the domain making the read therefore CORS blocks.
Looking for someone with good Apache and Ubuntu experience to help me resolve ideally by email or alternatively can share screen. No server access can be granted unfortunately. Can share more details when job awarded. This is a small item of work hence priced accordingly.
See uploaded word document (if PPH removes any of the code snippets from this description)
OS requirements: Linux
Extra notes:
Ewan M.
99% (31)Projects Completed
35
Freelancers worked with
28
Projects awarded
76%
Last project
17 Sep 2018
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
I can resolve this just by sending you one file. Piece of cake really :)
-
can you share site url?
381115380950
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies