Skip to content

Commit 53cf303

Browse files
author
Marc Odermatt
committed
Move URL to fabrid defs
1 parent 7feb089 commit 53cf303

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

daemon/internal/servers/grpc.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -683,12 +683,10 @@ func (s *DaemonServer) PolicyDescription(ctx context.Context,
683683
}
684684
description = response.Description
685685
} else {
686-
globalPolicyURL := "https://raw.githubusercontent.com/marcodermatt/fabrid-global-policies/main/policy-descriptions.json"
687-
688-
// Fetch the global policy from the URL
689-
policy, err := FetchGlobalPolicy(globalPolicyURL)
686+
// Fetch the global policy map from the URL
687+
policy, err := FetchGlobalPolicy(fabrid.GlobalPolicyURL)
690688
if err != nil {
691-
return nil, serrors.WrapStr("fetching global policy", err)
689+
return nil, serrors.WrapStr("fetching global policy map", err)
692690
}
693691

694692
// Retrieve the description for the given identifier

pkg/experimental/fabrid/defs.go

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ package fabrid
1616

1717
import "fmt"
1818

19+
const GlobalPolicyURL = "https://raw.githubusercontent.com/marcodermatt/fabrid-global-policies/main/policy-descriptions.json"
20+
1921
type PolicyID uint8
2022

2123
type Policy struct {

0 commit comments

Comments
 (0)