fraction / oasis

Free, open-source, peer-to-peer social application that helps you follow friends and discover new ones on Secure Scuttlebutt (SSB).
http://oasis-demo.fraction.io
GNU Affero General Public License v3.0
286 stars 42 forks source link

Allow GET params in /blob calls. #451

Closed black-puppydog closed 4 years ago

black-puppydog commented 4 years ago

This allows blobs to load when the blob reference in the markdown has ?contentType=image/jpeg or similar hints attached. It does so by simply removing the GET parameters from the URL though. It would be a bit nicer to actually use those hints to set the right HTTP response headers, but somehow koa keeps ignoring / overwriting (?) the manually-set Content-Type headers, so this has to do for now.

What's the problem you solved?

What solution are you recommending?

black-puppydog commented 4 years ago

Test message: %VeiuOtgOpA7yzzCFvoli6H19NQ2DRx/LJ4lPssi1nLk=.sha256

christianbundy commented 4 years ago

And this one too!