CORS settings take no effect

Hi,
What am I trying to do?
I have created Youtube component. There is an input to search videos. I would like to implement the same feature as youtube itself offers. When you start to type, it starts to offer suggestions. It is just about calling single endpoint. Easy…
How can I do that?
I think the best idea is to communicate with youtube directly from the UI. It has to be interractive so I need the lowest latencies. So I really think that UI is the right place.
The problem
If I send a request to youtube.com from UI, the browser block it because of CORS. I found out that I can add youtube to configuration.yaml this way:

http:
  cors_allowed_origins:
    - https://youtube.com

but it did not help at all. The first request to load the UI is sent to http://localhost:8123/lovelace/default_view and response looks like

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 3116
Date: Sun, 15 Nov 2020 11:28:35 GMT
Server: Python/3.7 aiohttp/3.6.1

There is no mention about CORS. I am not sure but I think CORS settings have to be in this response to make it works.

I tried 2 versions: Home Assistant 0.110.7 and Home Assistant 0.117.6
Frontend version: frontend: 20200519.5
My component is being developed via “Lovelace boilerplate-card” and it is injected to HA via resources as a javascript file.