IP filtering on blueprints.

Is there an easy way of IP filtering in flask when ranges are involved? Also I heard from a 11 years old post that flask level IP whitelisting has security concerns. Is there a standard way of doing this or should I create another service that is safegaurded with gateway level security or something?
15 Replies
Percy
Percy11mo ago
Project ID: N/A
maddsua
maddsua11mo ago
railway doesn't currently have a firewall and I haven't heard about it being planned you can use an nginx proxy to filter IPs and stuff
King Jahad
King JahadOP11mo ago
I can do that but the thing is I want it done on a particular level of api. /recieveWhatsAppMessages/*
maddsua
maddsua11mo ago
brody's gonna suggest something better than I can lol
Brody
Brody11mo ago
nginx proxies don't play well and require too much effort to get working properly with railways private network. just write a middleware for flask and use that instead, I wouldn't have even opened an 11 year old post
maddsua
maddsua11mo ago
but I just filter that in app
King Jahad
King JahadOP11mo ago
I read proxies in that post and the alarms went off.
Brody
Brody11mo ago
reverse proxys are generally fine, and in this context, it absolutely would be perfectly fine
King Jahad
King JahadOP11mo ago
I mean it said somebody can spoof IP using proxies?
King Jahad
King JahadOP11mo ago
Ik this is not a good source
Brody
Brody11mo ago
nginx, caddy, a middleware, a firewall, there's nothing you can do if users just jump on their vpn
King Jahad
King JahadOP11mo ago
fair enough and who is jumping facebook's vpn, right?
Brody
Brody11mo ago
true
King Jahad
King JahadOP11mo ago
Cool
Want results from more Discord servers?
Add your server