mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
🐛 默认请求方式
This commit is contained in:
parent
b4410e7cd7
commit
96c25f6fba
@ -4,7 +4,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
|
<small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
|
||||||
<br><br>
|
<br><br>
|
||||||
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.11.1&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.7.1-brightgreen?style=for-the-badge&logo=linux">
|
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.11.2&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.7.1-brightgreen?style=for-the-badge&logo=linux">
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<p>:trollface: <b>哪吒监控</b> 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,计划任务和在线终端。</p>
|
<p>:trollface: <b>哪吒监控</b> 一站式轻监控轻运维系统。支持系统状态、HTTP(SSL 证书变更、即将到期、到期)、TCP、Ping 监控报警,计划任务和在线终端。</p>
|
||||||
|
@ -42,17 +42,14 @@ func (n *Notification) reqURL(message string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (n *Notification) reqMethod() string {
|
func (n *Notification) reqMethod() string {
|
||||||
switch n.RequestMethod {
|
if n.RequestMethod == NotificationRequestMethodPOST {
|
||||||
case NotificationRequestMethodGET:
|
return http.MethodPost
|
||||||
return http.MethodGet
|
|
||||||
case NotificationRequestMethodPOST:
|
|
||||||
return http.MethodGet
|
|
||||||
}
|
}
|
||||||
return ""
|
return http.MethodGet
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Notification) reqBody(message string) (string, error) {
|
func (n *Notification) reqBody(message string) (string, error) {
|
||||||
if n.RequestMethod == NotificationRequestMethodGET {
|
if n.RequestMethod == NotificationRequestMethodGET || message == "" {
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
switch n.RequestType {
|
switch n.RequestType {
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
pb "github.com/naiba/nezha/proto"
|
pb "github.com/naiba/nezha/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var Version = "v0.11.1" // !!记得修改 README 中的 badge 版本!!
|
var Version = "v0.11.2" // !!记得修改 README 中的 badge 版本!!
|
||||||
|
|
||||||
var (
|
var (
|
||||||
Conf *model.Config
|
Conf *model.Config
|
||||||
|
Loading…
Reference in New Issue
Block a user