【发布时间】:2014-12-08 19:22:06
【问题描述】:
我做了一个简单的烧瓶应用:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET / HTTP/1.1
host:google.be
HTTP/1.0 404 NOT FOUND
Content-Type: text/html
Content-Length: 233
Server: Werkzeug/0.9.6 Python/2.7.6
Date: Mon, 08 Dec 2014 19:15:43 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Connection closed by foreign host.
我想要更改的一件事是服务器标头,目前设置为Werkzeug/0.9.6 Python/2.7.6 以我自己选择的东西。但我似乎无法在文档中找到有关如何执行此操作的任何内容。
【问题讨论】:
-
与您的要求并不密切,但在生产中,我会在 Web 服务器层(即 apache 或 nginx)执行此操作。