0

When I access my application, in console exist error like this :

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://my.system.com/my-system/assets/global/plugins/font-awesome/fonts/fontawesome-webfont.woff2?v=4.4.0. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

Though I open on localhost

How to solve the problem?

Thank you

moses toh
  • 2,860
  • 14
  • 55
  • 125
  • Can you share sample code? – Masum Billah Jun 01 '16 at 03:01
  • What type of web server are you using? Is this for a .NET application or something else? CORS needs to be enabled and to do so is different depending on your web server and can be enabled by downloading a nuget package in .NET. http://www.asp.net/web-api/overview/security/enabling-cross-origin-requests-in-web-api – Rob S. Jun 01 '16 at 03:09
  • Possible duplicate of [Disable same origin policy in Chrome](http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome) – ŹV - Jun 01 '16 at 03:11
  • @ZephyrPellerin that's not an effective way to resolve cross domain problems – charlietfl Jun 01 '16 at 03:12
  • @charlietfl The question relates to local development and no information on what http server is generating the CORS headers is provided. – ŹV - Jun 01 '16 at 03:15

1 Answers1

1

Add response header Access-Control-Allow-Origin : * on the server which host http://my.system.com/my-system/assets/global/plugins/font-awesome/fonts/fontawesome-webfont.woff2?v=4.4.0. will solve cross domain request issue.

Sing
  • 3,303
  • 2
  • 22
  • 37