Firebase hosting restricted access

狂风中的少年 提交于 2021-02-11 13:46:31

问题


Can we restrict access to website with firebase hosting to prevent search engine indexing? This would be helpful for dev/staging environments.

Something like AWS Amplify restricting access https://docs.aws.amazon.com/amplify/latest/userguide/access-control.html


回答1:


You can control whether a crawler indexes your site with the usual robots.txt instructions. Note that this file is not specific to Firebase Hosting, and commonly used to control if/what parts of a site bots crawl.

But aside from that, there is no way to control access to the files in Firebase Hosting; all files are world-readable.

See also:

  • Prevent Search Engine Indexing of Angular 5 Website - Firebase for some examples of a robots.txt.
  • Can Firebase hosting restrict access to resources?


来源:https://stackoverflow.com/questions/61861570/firebase-hosting-restricted-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!