In Rails I can read headers with
request.headers['HTTP_CF_CONNECTING_IP']
How can I do it in Sinatra?
Use request.env
for accessing request headers EX: header_token = request.env["HTTP_X_CSRF_TOKEN"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With