HTML output is being interpreted as plain text instead of being received as html

后端 未结 1 617
抹茶落季
抹茶落季 2021-01-05 17:11

I\'m sure this is just something dumb I\'m doing, but I\'m new to Go, so not sure what\'s going on here. I have the following basic setup.

requestHandler :=         


        
相关标签:
1条回答
  • 2021-01-05 17:32

    You need to add a header with the Content-Type

     w.Header().Set("Content-Type", "text/html")
    
    0 讨论(0)
提交回复
热议问题