Forum Discussion

J_P_Patinha-Ayd's avatar
Icon for Nimbostratus rankNimbostratus
Jun 26, 2019

Cross-Origin Request Blocked

Apologises if some information is missing but my knowledge of BIG-IPs is limited at best.


Basically we have users trying to access some external sites that appear to be using CORS to display videos.

Our BIG-IPs are setup with proxy servers to use SWG filtering.

Users are trying to access the site using FireFox 60.4.0 ESR.

Looking through the debug console when trying to access the following page for example:


Will return:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at (Reason: CORS header 'Access-Control-Allow-Origin' missing).


We've tried testing access using the latest FireFox version so as to rule out an issue with the browser.

Using a proxy that bypasses the BIG-IP loads the video without issue so it's definitely something in our setup that causing the CORS errors.


Any suggestions on how to resolve this would be greatly appreciated.

3 Replies

    • J_P_Patinha-Ayd's avatar
      Icon for Nimbostratus rankNimbostratus

      It doesn't look like we have ASM so I don't think this applies.

      Thanks for the reply though.

  • The Same Origin Policy (SOP) is the policy browsers implement to prevent vulnerabilities via Cross Site Scripting (XSS). In other words, the browser would not allow any site to make a request to any other site. It would prevent different origins from interacting with each other through such requests, like AJAX. This policy exists because it is too easy to inject a link to a javascript file that is on a different domain. This is a security risk - you really only want code that comes from the site you are on to execute and not just any code that is out there.

    The Cross Origin Resource Sharing (CORS) is one of the few techniques for relaxing the SOP. Because SOP is "on" by default, setting CORS at the server-side will allow a request to be sent to the server via an XMLHttpRequest even if the request was sent from a different domain. This becomes useful if your server was intended to serve requests from other domains (e.g. if you are providing an API).

    JSON with Padding is just a way to circumvent same-origin policy, when CORS is not an option. This is risky and a bad practice. Avoid using this.

    If you want to bypass that restriction when fetching the contents with fetch API or XMLHttpRequest in javascript, you can use a proxy server so that it sets the header Access-Control-Allow-Origin to *.

    If you need to enable CORS on the server in case of localhost, you need to have the following on request header.

    Access-Control-Allow-Origin: http://localhost:9999