Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

search query suggestion youtube API on Production results in Cors Error

$
0
0

I want the search suggestions like of Youtube on my application to work on Production as well.

The website is hosted on Firebase.

http://suggestqueries.google.com/complete/search?client=firefox&ds=yt&q=Query

I am using this API to fetch the results. The Results work on localhost but not on Production.

https://suggestqueries.google.com/complete/search?client=firefox&ds=yt&q=' from origin 'website hosted on Firebase' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

What should I do?

<meta      http-equiv="Content-Security-Policy"      content="upgrade-insecure-requests"    />

I added this tag in the Index file but it still did not resolve the Error


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>