19 Commits

Author SHA1 Message Date
Anthony Accioly
011efe0dd2 feat(server): add functional options for BlossomServer configuration
Introduce `ServerOption` to configure `BlossomServer` with functional
options. Add `WithRedirectURL` to enable flexible redirect URL handling
with placeholders. Update `New` constructor to accept optional
configurations.
2025-06-03 18:31:53 -03:00
Anthony Accioly
16eee5cffb feat(blossom): add redirect support for GET requests 2025-06-03 18:31:53 -03:00
sudocarlos
1ab44ab897 blossom: implement BUD-05 without optimizations (#45)
* blossom: implement BUD-05 without optimizations

* blossom: add redirect function, handle /media with 307 redirect to /upload

* blossome: remove duplicate /upload handle

* blossom: add content-length header to handleHasBlob()

* blossom: add content-type header to handleHasBlob()

* blossom: remove blossomRedirect() and use http.Redirect() for handleMedia() instead
2025-05-08 10:29:26 -03:00
fiatjaf
3da898cec7 blossom: implement BUD-04
closes https://github.com/fiatjaf/khatru/issues/43
2025-05-06 00:44:45 -03:00
andrewheadricke
28ce6cfb7a ensure suspected blossom request hash does not have slashes in it 2025-03-24 15:23:00 -03:00
k.
414867e62c feat(blossom): add bud-09 reporting handler. (#29) 2025-02-01 18:03:17 -03:00
girino
3f26a1f727 Change API of LoadBlob to return io.ReadSeeker instead of io.Reader and use ServeContent to serve blob content (#19)
* first test with http.ServeContent

* added debug to help me here

* removed debug messages

* changed LoadBlob to requisre io.ReadSeeker

---------

Co-authored-by: Your Name <you@example.com>
2024-11-21 11:58:12 -03:00
Anthony Accioly
3d4dd71510 refactor(blossom): undo enhanced routing 2024-11-05 18:55:47 +00:00
Anthony Accioly
582a74c000 refactor: apply CORS rules on relay 2024-11-05 18:37:12 +00:00
Anthony Accioly
bbcf948dd6 fix(blossom): forward requests to base relay 2024-11-05 17:56:56 +00:00
Anthony Accioly
2a80d4099d perf(blossom): set Access-Control-Max-Age to 24 h 2024-11-05 16:56:59 +00:00
Anthony Accioly
ad6635d86c refactor(blossom): use Go 1.22 enhanced routing 2024-11-05 16:48:21 +00:00
Anthony Accioly
c93441cd63 feat(blossom): use rs/cors to handle BUD-01 CORS 2024-11-04 17:18:37 +00:00
Anthony Accioly
1c15db2ca1 fix(blossom): CORS headers required by noStrudel 2024-10-31 07:50:34 -03:00
fiatjaf
1d7bdccb3a blossom: fixes and updates from trying to use it. 2024-10-29 09:01:19 -03:00
fiatjaf
92d1a5b671 blossom: implement bud06 (upload requirements). 2024-10-29 09:01:16 -03:00
fiatjaf
7f878121fc blossom: return code from Reject* functions because HTTP is stupid. 2024-10-29 09:01:13 -03:00
fiatjaf
a893dc2d2c blossom: store as a standalone interface (and an eventstore wrapper). 2024-10-29 09:01:04 -03:00
fiatjaf
91e7737ec1 basic modular blossom support. 2024-10-27 17:20:10 -03:00