Disable default domain https://[project-id].appspot.com of Node JS on Google App Engine

前端 未结 3 2008
小蘑菇
小蘑菇 2020-12-20 21:21

I have deployed my Node JS app onto Google Cloud App Engine, and I can successfully add my custom domain for my app.

Let say my custom domain is example.com

3条回答
  •  失恋的感觉
    2020-12-20 22:11

    You cannot disable that default domain. You would have to write a redirect script. You can test for "appspot" in the request's HTTP_HOST, and test for "AppEngine-Google" in the request's HTTP_USER_AGENT, to determine if it is an internal request.

    Also, internal functions, like cron jobs and task queues, run on that domain, so be careful what you do. Task queues will fail given a 301.

提交回复
热议问题