TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why should hacker news redirect to https url?

1 点作者 critiq大约 12 年前
http request to news.ycombinator.com redirects secure URL, I can't imagine reason behind it.. is it to avoid some one hijacking browser requests on client side?<p>&#62; GET / HTTP/1.1 &#62; User-Agent: curl/7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/3.12.6.2 zlib/1.2.3 libidn/1.18 libssh2/1.2.2 &#62; Host: news.ycombinator.com &#62; Accept: <i>/</i> &#62; &#60; HTTP/1.1 301 Moved Permanently &#60; Server: nginx &#60; Date: Fri, 19 Apr 2013 07:13:39 GMT &#60; Content-Type: text/html &#60; Content-Length: 178 &#60; Connection: keep-alive &#60; Location: https://news.ycombinator.com/

1 comment

vy8vWJlco大约 12 年前
It's probably easier than differentiating between logged in and not-logged in, when it is understandably desirable to secure logged in traffic (which had been lacking for some time).<p>Curl can handle the redirect automatically (as well as HTTPS). Try something like:<p>curl -L <a href="http://news.ycombinator.com" rel="nofollow">http://news.ycombinator.com</a><p>or just point it to HTTPS directly.