How to access html file on google storage bucket without pointing to file with html extension

前端 未结 1 566
予麋鹿
予麋鹿 2020-12-19 19:54

I\'d like to let website users load userProfile.html when they request www.website.com/userProfile (without .html). There is nothing about that in docs.

1条回答
  •  眼角桃花
    2020-12-19 20:26

    You can serve HTML content without a .html suffix. It's important to set the content-type though. For example, with gsutil:

    gsutil -h "Content-Type:text/html" cp /path/users/userProfile \
        gs://www.website.com/userProfile
    

    0 讨论(0)
提交回复
热议问题