mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-20 18:20:12 +00:00
feat(agentcompat): expose dashboard capability routes
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
//go:build !agentcompat
|
||||
|
||||
package rpc
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/nezhahq/nezha/model"
|
||||
serviceRPC "github.com/nezhahq/nezha/service/rpc"
|
||||
)
|
||||
|
||||
type natCapabilityLease struct {
|
||||
active bool
|
||||
publicationOwned bool
|
||||
streamLease *serviceRPC.AgentCompatNATStreamLease
|
||||
access serviceRPC.AgentCompatCapabilityAccess
|
||||
handle serviceRPC.AgentCompatNATPublishHandle
|
||||
}
|
||||
|
||||
func prepareNATCapability(request *http.Request, _ *model.NAT) (natCapabilityLease, error) {
|
||||
request.Header.Del("Authorization")
|
||||
return natCapabilityLease{}, nil
|
||||
}
|
||||
|
||||
func (lease natCapabilityLease) cleanup(*serviceRPC.NezhaHandler) {}
|
||||
Reference in New Issue
Block a user