A fork of the Cocoon PDS but being made more distributed.
11

Configure Feed

Select the types of activity you want to include in your feed.

remove fallback proxy header

Hailey (Aug 27, 2025, 10:22 AM -0700) dda2dc4c 95eea86d

+22 -35
+2 -8
cmd/cocoon/main.go
··· 132 132 EnvVars: []string{"COCOON_SESSION_SECRET"}, 133 133 }, 134 134 &cli.StringFlag{ 135 - Name: "default-atproto-proxy", 136 - EnvVars: []string{"COCOON_DEFAULT_ATPROTO_PROXY"}, 137 - Value: "did:web:api.bsky.app#bsky_appview", 138 - }, 139 - &cli.StringFlag{ 140 135 Name: "blockstore-variant", 141 136 EnvVars: []string{"COCOON_BLOCKSTORE_VARIANT"}, 142 137 Value: "sqlite", ··· 189 184 AccessKey: cmd.String("s3-access-key"), 190 185 SecretKey: cmd.String("s3-secret-key"), 191 186 }, 192 - SessionSecret: cmd.String("session-secret"), 193 - DefaultAtprotoProxy: cmd.String("default-atproto-proxy"), 194 - BlockstoreVariant: server.MustReturnBlockstoreVariant(cmd.String("blockstore-variant")), 187 + SessionSecret: cmd.String("session-secret"), 188 + BlockstoreVariant: server.MustReturnBlockstoreVariant(cmd.String("blockstore-variant")), 195 189 }) 196 190 if err != nil { 197 191 fmt.Printf("error creating cocoon: %v", err)
-3
server/handle_proxy.go
··· 19 19 20 20 func (s *Server) getAtprotoProxyEndpointFromRequest(e echo.Context) (string, string, error) { 21 21 svc := e.Request().Header.Get("atproto-proxy") 22 - if svc == "" { 23 - svc = s.config.DefaultAtprotoProxy 24 - } 25 22 26 23 svcPts := strings.Split(svc, "#") 27 24 if len(svcPts) != 2 {
+20 -24
server/server.go
··· 104 104 105 105 SessionSecret string 106 106 107 - DefaultAtprotoProxy string 108 - 109 107 BlockstoreVariant BlockstoreVariant 110 108 } 111 109 112 110 type config struct { 113 - Version string 114 - Did string 115 - Hostname string 116 - ContactEmail string 117 - EnforcePeering bool 118 - Relays []string 119 - AdminPassword string 120 - SmtpEmail string 121 - SmtpName string 122 - DefaultAtprotoProxy string 123 - BlockstoreVariant BlockstoreVariant 111 + Version string 112 + Did string 113 + Hostname string 114 + ContactEmail string 115 + EnforcePeering bool 116 + Relays []string 117 + AdminPassword string 118 + SmtpEmail string 119 + SmtpName string 120 + BlockstoreVariant BlockstoreVariant 124 121 } 125 122 126 123 type CustomValidator struct { ··· 343 340 plcClient: plcClient, 344 341 privateKey: &pkey, 345 342 config: &config{ 346 - Version: args.Version, 347 - Did: args.Did, 348 - Hostname: args.Hostname, 349 - ContactEmail: args.ContactEmail, 350 - EnforcePeering: false, 351 - Relays: args.Relays, 352 - AdminPassword: args.AdminPassword, 353 - SmtpName: args.SmtpName, 354 - SmtpEmail: args.SmtpEmail, 355 - DefaultAtprotoProxy: args.DefaultAtprotoProxy, 356 - BlockstoreVariant: args.BlockstoreVariant, 343 + Version: args.Version, 344 + Did: args.Did, 345 + Hostname: args.Hostname, 346 + ContactEmail: args.ContactEmail, 347 + EnforcePeering: false, 348 + Relays: args.Relays, 349 + AdminPassword: args.AdminPassword, 350 + SmtpName: args.SmtpName, 351 + SmtpEmail: args.SmtpEmail, 352 + BlockstoreVariant: args.BlockstoreVariant, 357 353 }, 358 354 evtman: events.NewEventManager(events.NewMemPersister()), 359 355 passport: identity.NewPassport(h, identity.NewMemCache(10_000)),