How to solve 'Redirect has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header'?

前端 未结 17 2249
遥遥无期
遥遥无期 2020-11-27 13:12

I am working on an app using Vue js. According to my setting I need to pass to a variable to my URL when setting change.



        
17条回答
  •  死守一世寂寞
    2020-11-27 13:48

    To add the CORS authorization to the header using Apache, simply add the following line inside either the , , or sections of your server config (usually located in a *.conf file, such as httpd.conf or apache.conf), or within a .htaccess file:

    Header set Access-Control-Allow-Origin "*"

    And then restart apache.

    Altering headers requires the use of mod_headers. Mod_headers is enabled by default in Apache, however, you may want to ensure it's enabled.

提交回复
热议问题