502 Error while connecting to api of same domain

I’m doing this way.