HTTP request works with cURL but gets CORS response when made in browser with javascript

后端 未结 2 801
眼角桃花
眼角桃花 2021-01-19 15:50

When I access the typeform API via browser using $.get or superagent or request or axios, I get the error No \'Access-Control-Allow-Origin\' header is present on the request

2条回答
  •  误落风尘
    2021-01-19 16:32

    CORS error can be manipulated through htaccess easily.

    Add this to your .htaccess file: (add more file extensions as you need)

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

提交回复
热议问题