sinatra and nginx client cert authentication setup, repository for a follow-along of a guide at https://www.integralist.co.uk/posts/client-cert-authentication/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
187B

  1. require 'sinatra'
  2. set :server, %w[thin webrick]
  3. set :bind, '0.0.0.0'
  4. get '/' do
  5. 'Hello world'
  6. end
  7. get '/foo' do
  8. 'Bar'
  9. end
  10. get '/cert' do
  11. request.env['HTTP_X_CLIENTCERT_DN']
  12. end