Reputation: 87
In a simple oauth call the application is called from localhost and the return url comes in 127.0.0.1 but browser gives and error as Blocked a frame with origin "http://127.0.0.1" from accessing a frame with origin "http://localhost". Why does browser treat them differently?
Thanks
Upvotes: 0
Views: 452
Reputation: 639
One is a name, the other is an ip address.
Its just a security feature, to stop cross domain requests etc.
127.0.0.1 != localhost, localhost resolves to 127.0.0.1 it is not the same "domain".
Upvotes: 1