Google App Engineでのサブドメインの操作に関する質問では、次のコードが提案されました。
applications = {
'product.example.com': webapp.WSGIApplication([
('/', IndexHandler),
('/(.*)', ProductHandler)]),
'user.example.com': webapp.WSGIApplication([
('/', IndexHandler),
('/(.*)', UserHandler)]),
}
def main():
run_wsgi_app(applications[os.environ['HTTP_HOST']])
if __name__ == '__main__':
main()
私の質問は、これをローカルでテストするにはどうすればよいですか?ローカルでテストしている場合、ホストは「localhost:8080」であり、どのドメインでもありません。