hzrd149 on Nostr: BUD-01 doesn't mention anything about 301 or 302 redirects, mostly because no one has ...
BUD-01 doesn't mention anything about 301 or 302 redirects, mostly because no one has implemented them yet. However you bring up a good point.
I would say both
https://www.myblossomserver/b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553https://s3.us-east-2.amazonaws.com/myawesomebucket/b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553 are blossom compatible URLs because they contain a sha256 as the filename that presumably matches the file returned.
However only the first "www.myblossomserver" URL is a "blossom" URL because the hash is at the root path
When it comes to redirects. they shouldn't cause any issues in the protocol as along as the browser or client knows how to handle redirects (the -L flag in curl)
The only concern I have is for users. for example if I upload an image to myblossomserver.com and it gives me the URL mybloccomserver.com/<sha256>.webp
If the user opens the URL, gets redirected to s3.us-east-2.amazonaws.com/myawesomebucket/<sha256> (without the .webp ext) and copies the URL in the browsers URL bar. they will end up pasting a "bad" URL into their social media post and then image wont show in most clients
Again I don't think there is any harm in using redirects, but you have to keep in mind a lot of users actually copy the URL from the address bar. or modify it directly
Published at
2025-02-13 18:38:25Event JSON
{
"id": "2029ea4a3c7ceb2d0d1374d7a6a64d333df3520093e4cf9c4498928b9138a3ca",
"pubkey": "266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5",
"created_at": 1739471905,
"kind": 1,
"tags": [
[
"e",
"01bd175441f0173af5b1e3a19fae73b46d268ab1527b6e73d6f0402c432d5af3",
"",
"root"
],
[
"e",
"770c4c1a72dc2db63f68adbaee9116795fa906e3f080e570e612d347321120e6",
"wss://nostrue.com",
"reply",
"ee9d979e7e1418a9f7472baf82dc96082a0d4251b77bcb170a6ecec93fadff64"
],
[
"p",
"bd4ae3e67e29964d494172261dc45395c89f6bd2e774642e366127171dfb81f5"
],
[
"p",
"ee9d979e7e1418a9f7472baf82dc96082a0d4251b77bcb170a6ecec93fadff64"
],
[
"client",
"noStrudel",
"31990:266815e0c9210dfa324c6cba3573b14bee49da4209a9456f9484e5106cd408a5:1686066542546"
]
],
"content": "BUD-01 doesn't mention anything about 301 or 302 redirects, mostly because no one has implemented them yet. However you bring up a good point.\nI would say both\nhttps://www.myblossomserver/b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553\nhttps://s3.us-east-2.amazonaws.com/myawesomebucket/b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553 \nare blossom compatible URLs because they contain a sha256 as the filename that presumably matches the file returned.\nHowever only the first \"www.myblossomserver\" URL is a \"blossom\" URL because the hash is at the root path\n\nWhen it comes to redirects. they shouldn't cause any issues in the protocol as along as the browser or client knows how to handle redirects (the -L flag in curl)\nThe only concern I have is for users. for example if I upload an image to myblossomserver.com and it gives me the URL mybloccomserver.com/\u003csha256\u003e.webp\nIf the user opens the URL, gets redirected to s3.us-east-2.amazonaws.com/myawesomebucket/\u003csha256\u003e (without the .webp ext) and copies the URL in the browsers URL bar. they will end up pasting a \"bad\" URL into their social media post and then image wont show in most clients\n\nAgain I don't think there is any harm in using redirects, but you have to keep in mind a lot of users actually copy the URL from the address bar. or modify it directly",
"sig": "f1c56c737a64b1a34a5f35e7de11983a788c208e44f71b59eb26e65710b3daf5a257c9bc3c9e9fbb92537748ede83fa0ab5800195124b693e0b61d51b8602c83"
}