拥有解析为127.0.0.1的域名(spotilocal)的优点是什么? [英] What is the advantage of having a domain name (spotilocal) that resolves to 127.0.0.1?
问题描述
不确定是否最适合程序员,服务器故障或堆栈溢出。但是,这不是关于Facebook开发的一个问题。
Not sure if this is best suited to Programmers, Server Fault or Stack Overflow. It's not, however, a question about developing for Facebook.
Facebook 最近宣布与Spotify进行更紧密的整合。控制Spotify桌面软件的播放/暂停按钮已添加到Facebook,最新版本的Spotify客户端运行本地Web服务器。例如,Facebook拨打电话:
Facebook recently announced tighter integration with Spotify. Play/pause buttons that control the Spotify desktop software have been added to Facebook, and the most recent version of the Spotify client runs a local web server. Facebook makes calls to, for example:
http://1234.spotilocal.com:4380/remote/status.json
http://1234.spotilocal.com:4380/remote/play.json
http://1234.spotilocal.com:4380/remote/pause.json
...其中 *。spotilocal.com
解析为 127.0.0.1
。
将域名解析为localhost有什么优势?是否这样Spotify可以快速地对该域名进行代码更改,如果有什么应该破产,那么不必依靠Facebook?
What is the advantage of having a domain name that resolves to localhost? Is it so that Spotify can quickly make a code change on that domain name if something should break, and so don't have to rely on Facebook?
似乎Facebook可以只要轻松点击:
It seems Facebook could just as easily point to:
http://127.0.0.1:4380/remote/status.json
推荐答案
设计时我们最大的原因是它可以与https没有混合内容警告。获取真实域的证书比获得127.0.0.1的证书容易得多。
the biggest reason for us when designing it was so that it would work with https without a mixed-content warning. Getting a cert for a real domain is a lot easier than getting one for 127.0.0.1.
这篇关于拥有解析为127.0.0.1的域名(spotilocal)的优点是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!