HaschekSolutions / pictshare

:camera: PictShare is an open source image, mp4, pastebin hosting service with a simple resizing and upload API that you can host yourself. :rice_scene:
https://www.pictshare.net
Apache License 2.0
819 stars 123 forks source link

Restricting uploading (password protection?) #149

Closed peczony closed 10 months ago

peczony commented 1 year ago

Hi, thank you for the great work on the project!

I skimmed through the docs and couldn't understand how I could protect my instance from abuse. If it's open to the internet, anyone could host their content, including undesirable content (e.g. porn).

Is there any mechanism I could use to prevent this? I couldn't find any mention of passwords or tokens in the docs which could be used to prevent outside uploads. Ideally I would want to keep the instance only for myself & friends that I trust.

geek-at commented 1 year ago

Hey!

At the moment there is only the "ALLOWED_SUBNET" config variable which limits uploads from an IP or IP space you define.

There is also a variable called "UPLOAD_CODE" that's not yet implemented but will act as a token that has to be specified in order to upload