5 ms·
Show HN: Pastebin-like tool with focus on privacy and security
- derekzhouzhen 5y agoNice. Can you provide a raw download link such as: https://www.pastesafely.com/pastes/P73?format=raw https://www.pastesafely.com/pastes/P73?format=raw So I can curl it in a script?
- mfa 5y agoThere's actually a (not yet documented) API available. If you curl curl https://www.pastesafely.com/api/paste/P73 https://www.pastesafely.com/api/paste/P73 you'll the paste and it's metadata in json. Would that work for your use case?
- derekzhouzhen 5y agoSince it is a pastebin, it would be nice to have something that just spit out the raw content of the pasteboard. I guess E2E encryption will not work here but often times people don't need that. Being able to tell my user to just type: curl https:// https://... | sh would be valuable.
- mfa 5y agoGot it. Makes sense and just added it. You can now curl https://www.pastesafely.com/pastes/P73?format=raw https://www.pastesafely.com/pastes/P73?format=raw ;-)
- derekzhouzhen 5y agoThanks. If you can infer the correct MIME type from the language and send the correct Content-Type header it will be even more useful. I know most languages don't have a dedicated MIME, but some do, such as html, json or svg.
- mfa 5y agoI think all you're suggestions are good and just finished adding them. Thanks for the feedback!
- derekzhouzhen 5y agoLet me put all suggestions on this together. They should be fairly easy to implement and will enhance the usefulness and security of this feature: * You should support HTTP HEAD request * You should infer MIME type from language selections and set Content-Type header as much as possible. If there is none, the default shall be text/plain not text/html * You should set `Content-Security-Policy: sandbox` HTTP header so people cannot use your service to do malicious stuff * You should set `Access-Control-Allow-Origin: *` so it can be used in pure client-side JAMStack applications