forked from coracle/zooid
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f46ba28aef |
@@ -95,7 +95,6 @@ Configures NIP 86 support.
|
||||
Configures blossom support.
|
||||
|
||||
- `enabled` - whether blossom is enabled.
|
||||
- `authenticated_read` - whether users must perform NIP 98 AUTH in order to fetch a file.
|
||||
|
||||
### `[push]`
|
||||
|
||||
|
||||
@@ -165,10 +165,6 @@ func (bl *BlossomStore) Enable(instance *Instance) {
|
||||
}
|
||||
|
||||
backend.RejectGet = func(ctx context.Context, auth *nostr.Event, sha256 string, ext string) (bool, string, int) {
|
||||
if !bl.Config.Blossom.AuthenticatedRead {
|
||||
return false, "", 200
|
||||
}
|
||||
|
||||
if auth == nil || !instance.Management.IsMember(auth.PubKey) {
|
||||
return true, "unauthorized", 403
|
||||
}
|
||||
|
||||
+1
-2
@@ -46,8 +46,7 @@ type Config struct {
|
||||
} `toml:"management" json:"management"`
|
||||
|
||||
Blossom struct {
|
||||
Enabled bool `toml:"enabled" json:"enabled"`
|
||||
AuthenticatedRead bool `toml:"authenticated_read" json:"authenticated_read"`
|
||||
Enabled bool `toml:"enabled" json:"enabled"`
|
||||
Backend string `toml:"backend" json:"backend"`
|
||||
S3 BlossomS3Settings `toml:"s3" json:"s3"`
|
||||
} `toml:"blossom" json:"blossom"`
|
||||
|
||||
Reference in New Issue
Block a user