External datasource prometheus 401 error

Good day
I have the same issue as the owner of the topic

https://localhost:3000/t/datasource-save-and-test-cors-orgin-error/3327/9

I have several external prometheus datasources in grafana. All of them are configured the same way.

Only 2 of them work properly, the 3d one has errors.
When i try to test the datasource, it has 400 error in dev console in browser
And i can`t explore and take metrics from this datasource

The response says Authentication to data source failed


i tried to fix it like this server { server_name MyServer ; listen 80 ; listen [::]:80 ; l - Pastebin.com
but nothing happend. Please help

Also i tried to use solution from this issue Prometheus Basic Auth 401 code

But my problem is not solved