dongzhou5344 2016-11-25 15:25
浏览 45
已采纳

Heroku htaccess基本身份验证上的Golang应用

Is possible use htaccess on golang application running in heroku??
I had read this link but the solution doesn't work for me (also, the command htpasswd is not recognized in the heroku bash, but I made the htpasswd file usin this tool).

Thank you.

  • 写回答

1条回答 默认 最新

  • dsm42026 2016-11-28 21:33
    关注

    A Go web application is a server so no need to use Apache httpd server, especially on Heroku that has crystal clear deployment instructions for Go :

    https://devcenter.heroku.com/categories/go

    Follow these instruction closely and you'll find out there is no need for Apache.

    htaccess and htpasswd are related to Apache httpd server, they are Apache configuration files.

    Finally, Go standard library gives you all the tools you need to implement basic auth yourself :

    https://golang.org/pkg/net/http/#Request.BasicAuth

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计