improve faq+privacy policy; rename pow and access tracker intialize functions to just New

since they are in their own package now
This commit is contained in:
2026-11-22 13:03:48 -05:00
parent 8fc87ab200
commit 80ad8a62ae
6 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -40,12 +40,12 @@ func main() {
log.Fatal(err)
}
tracker := uploads.NewAccessTracker()
tracker := uploads.New()
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go tracker.Run(ctx, db)
challengeStore := reports.NewChallengeStore(3 * time.Minute)
challengeStore := reports.New(3 * time.Minute)
log.Println("listening on", config.Addr)
router := server.NewRouter(db, config, pages, tracker, challengeStore)
+1 -1
View File
@@ -27,7 +27,7 @@ type ChallengeStore struct {
const MaxChallenges = 10000
func NewChallengeStore(ttl time.Duration) *ChallengeStore {
func New(ttl time.Duration) *ChallengeStore {
if ttl <= 0 || ttl > 10*time.Minute {
panic("invalid challenge ttl")
}
+1 -1
View File
@@ -15,7 +15,7 @@ type AccessTracker struct {
pending map[string]int64
}
func NewAccessTracker() *AccessTracker {
func New() *AccessTracker {
return &AccessTracker{
pending: make(map[string]int64),
}
+1
View File
@@ -47,6 +47,7 @@ goals:
- [x] PoW challenges/captchas
- [ ] switch to argon2id instead of sha256
- javascript required
- [ ] ASN blocking via geolite2
## misc goals
+1 -1
View File
@@ -29,7 +29,7 @@
</p>
<p>
be wary of any metadata included in the files you are uploading,
especially photos from a phone as they may contain GPS data.
especially photos from a phone as they may contain GPS metadata or any other private metadata.
</p>
{{if .NormalizeMIMETypes}}
<h3>why are my html/svg/pdf uploads not being rendered?</h3>
+5 -2
View File
@@ -21,8 +21,11 @@
<p>when you upload a file or paste, we store:</p>
<ul>
<li>the file or paste content</li>
<li>the original filename, type, and size</li>
<li>an upload id and a SHA256 hash of the content</li>
<li>the original filename</li>
<li>detected file type</li>
<li>size of the content</li>
<li>an upload id</li>
<li>SHA256 hash of the content</li>
<li>timestamps and the selected expiry</li>
<li>a deletion token</li>
</ul>