mirror of
https://github.com/safing/portmaster
synced 2025-09-10 15:08:22 +00:00
Fix and document netquery api endpoint permissions
This commit is contained in:
parent
9e4bdfb341
commit
a98505b7da
1 changed files with 2 additions and 4 deletions
|
@ -89,8 +89,8 @@ func (m *module) prepare() error {
|
|||
if err := api.RegisterEndpoint(api.Endpoint{
|
||||
Path: "netquery/query",
|
||||
MimeType: "application/json",
|
||||
Read: api.PermitUser,
|
||||
Write: api.PermitUser,
|
||||
Read: api.PermitUser, // Needs read+write as the query is sent using POST data.
|
||||
Write: api.PermitUser, // Needs read+write as the query is sent using POST data.
|
||||
BelongsTo: m.Module,
|
||||
HandlerFunc: queryHander.ServeHTTP,
|
||||
Name: "Query Connections",
|
||||
|
@ -102,7 +102,6 @@ func (m *module) prepare() error {
|
|||
if err := api.RegisterEndpoint(api.Endpoint{
|
||||
Path: "netquery/charts/connection-active",
|
||||
MimeType: "application/json",
|
||||
Read: api.PermitUser,
|
||||
Write: api.PermitUser,
|
||||
BelongsTo: m.Module,
|
||||
HandlerFunc: chartHandler.ServeHTTP,
|
||||
|
@ -116,7 +115,6 @@ func (m *module) prepare() error {
|
|||
Path: "netquery/history/clear",
|
||||
MimeType: "application/json",
|
||||
Write: api.PermitUser,
|
||||
Read: api.PermitUser,
|
||||
BelongsTo: m.Module,
|
||||
HandlerFunc: func(w http.ResponseWriter, r *http.Request) {
|
||||
var body struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue