Logging user data
Hi, I'm about to put a Django project into production on Railway, at the moment in dev testing I'm logging visitors IP addresses/time stamps to a text file. Is there a proven workflow within Railway which can securely handle this sort of thing? How do I write to a file in a secure way?
4 Replies
I'm pretty sure it should already be very secure, each deployment runs in an isolated environment and since you write directly to the server, the info never leaves the server
Although if you mean to persist the data then you'd want to write to a volume
If you need to add more security, you could encrypt it, but I'd say that's overkill, especially since you're only storing IPs
Ok, i'll have look further into volumes, sorry I didn't provide project ID as this isn't a live project currently.
No problem
it says it closes the thread but I don't think it actually does
Ah ok thanks for that. Yea pretty sure Volumes are the way to go with this. Create volume path then just use RAILWAY_VOLUME_MOUNT_PATH = /foobar/ in my Django settings and point my function that gathers the data to RAILWAY_VOLUME_MOUNT_PATH to save.