Skip to content

Commit

Permalink
Merge pull request #285 from Jinvic/dev
Browse files Browse the repository at this point in the history
前端地址添加协议头
  • Loading branch information
xuewenG authored Feb 17, 2025
2 parents 74545a5 + 4badeeb commit 92c9b05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/handler/comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func (c CommentHandler) AddComment(ctx echo.Context) error {

if err = c.base.db.Save(&comment).Error; err == nil {
go func() {
frontendHost := ctx.Request().Host
frontendHost := fmt.Sprintf("%s://%s", ctx.Scheme(), ctx.Request().Host)
if err = c.commentEmailNotification(comment, frontendHost); err != nil {
c.base.log.Error().Msgf("邮件通知失败,原因:%s", err)
}
Expand Down
2 changes: 1 addition & 1 deletion backend/handler/rss.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewRssHandler(injector do.Injector) *RssHandler {
}

func (r RssHandler) GetRss(c echo.Context) error {
frontendHost := c.Request().Host
frontendHost := fmt.Sprintf("%s://%s", c.Scheme(), c.Request().Host)
rss, err := r.generateRss(frontendHost)
if err != nil {
return FailRespWithMsg(c, Fail, "RSS生成失败")
Expand Down

0 comments on commit 92c9b05

Please sign in to comment.