Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to set HTTP Request Headers on Mac

Posted on 2014-10-17
2
Medium Priority
?
242 Views
Last Modified: 2014-10-21
Hey all.

I am trying to run our website from my local machine and am having cross origin issues. Here is the error.

XMLHttpRequest cannot load http://internaldomain/<pathtofile> No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mymachine.mycompany.com' is therefore not allowed access.

How do I set the access-control-allow-origin? I've googled it and have seen examples of PHP code, but I was thinking there would be a way to modify the configuration for the Apache running on my Mac.

Is it a matter of modifying the Apache configuration and if so, how is that done on a Mac?
0
Comment
Question by:Webspeeder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 40388062
See if this page helps:  http://enable-cors.org/server_apache.html  I don't have a server or code that I can use to test it.
0
 
LVL 33

Expert Comment

by:shalomc
ID: 40389319
From a security perspective, Setting the access control for all is not necessarily what you have in mind.
Access-Control-Allow-Origin   *

Therefore, I always recommend to limit the cross domain access to the relevant origin domains, and use a wildcard only when you actually need a wildcard.
Access-Control-Allow-Origin  http://mymachine.mycompany.com
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few customers have recently asked my thoughts on Password Managers.  As Security is a big part of our industry I was initially very hesitant and sceptical about giving a program all of my secret passwords.  But as I was getting asked about them mo…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question