mirror of
https://github.com/fosrl/badger.git
synced 2026-02-08 05:56:46 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be5015cc2a | ||
|
|
f00a92c7af |
4
main.go
4
main.go
@@ -10,6 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/fosrl/badger/ips"
|
"github.com/fosrl/badger/ips"
|
||||||
|
"github.com/fosrl/badger/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
@@ -52,6 +53,7 @@ type VerifyBody struct {
|
|||||||
RequestIP *string `json:"requestIp,omitempty"`
|
RequestIP *string `json:"requestIp,omitempty"`
|
||||||
Headers map[string]string `json:"headers,omitempty"`
|
Headers map[string]string `json:"headers,omitempty"`
|
||||||
Query map[string]string `json:"query,omitempty"`
|
Query map[string]string `json:"query,omitempty"`
|
||||||
|
BadgerVersion string `json:"badgerVersion,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type VerifyResponse struct {
|
type VerifyResponse struct {
|
||||||
@@ -64,6 +66,7 @@ type VerifyResponse struct {
|
|||||||
Name *string `json:"name,omitempty"`
|
Name *string `json:"name,omitempty"`
|
||||||
Role *string `json:"role,omitempty"`
|
Role *string `json:"role,omitempty"`
|
||||||
ResponseHeaders map[string]string `json:"responseHeaders,omitempty"`
|
ResponseHeaders map[string]string `json:"responseHeaders,omitempty"`
|
||||||
|
PangolinVersion *string `json:"pangolinVersion,omitempty"`
|
||||||
} `json:"data"`
|
} `json:"data"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,6 +231,7 @@ func (p *Badger) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||||||
RequestIP: &realIP,
|
RequestIP: &realIP,
|
||||||
Headers: headers,
|
Headers: headers,
|
||||||
Query: queryParams,
|
Query: queryParams,
|
||||||
|
BadgerVersion: version.Version,
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonData, err := json.Marshal(cookieData)
|
jsonData, err := json.Marshal(cookieData)
|
||||||
|
|||||||
3
version/version.go
Normal file
3
version/version.go
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
package version
|
||||||
|
|
||||||
|
const Version = "1.3.1"
|
||||||
Reference in New Issue
Block a user