Twitter counter does not work for qa and prod but works on dev


the same code is tested in 3 environments Not working) working)

I’m using the following code

The followig is what I have observer
After I submited the tweet the request goes to
I compared the HAR of this request and I found out that the refere attibute is wrong when it is failing.

in dev (working environment) file it shows the following which i s correct
"name": “referer”,
“value”: “

But in qa (Not working environment) it shows
"name": “referer”,
“value”: ""
This is not the referer this is the current url

I think that is the issue.

Let me know if you need more information