如何检查是从localhost还是从外部访问网页?(How to check if webpage is accessed from localhost or from outside?)

如何从Go查看是从localhost还是从外部访问网页?

如何为外部用户禁用某些功能?

我怎么能隐藏整个网站,比如“没有,这里什么也没有,端口8080关闭,移动”。

How can I check from Go whether a webpage is accessed from localhost or from outside?

How can I disable some functions for external users?

How can I hide the whole site, like "nope, nothing here, port 8080 is closed, move along".

如何检查是从localhost还是从外部访问网页?(How to check if webpage is accessed from localhost or from outside?)

如何从Go查看是从localhost还是从外部访问网页?

如何为外部用户禁用某些功能?

我怎么能隐藏整个网站,比如“没有,这里什么也没有,端口8080关闭,移动”。

How can I check from Go whether a webpage is accessed from localhost or from outside?

How can I disable some functions for external users?

How can I hide the whole site, like "nope, nothing here, port 8080 is closed, move along".