How can I password-protect my /sidekiq route (i.e. require authentication for the Sidekiq::Web tool)?

前端 未结 8 1280
太阳男子
太阳男子 2021-02-01 00:52

I am using sidekiq in my rails application. By Default, Sidekiq can be accessed by anybody by appending \"/sidekiq\" after the url. I want to password protect / authenticate onl

8条回答
  •  梦毁少年i
    2021-02-01 01:28

    See "Security" under https://github.com/mperham/sidekiq/wiki/Monitoring

    Sidekiq::Web uses Rack::Protection to protect your application against typical web attacks (such as CSRF, XSS, etc). Rack::Protection would invalidate your session and raise Forbidden error if it finds that your request doesn't satisfy security requirements. One of the possible situations is having your application working behind a reverse proxy and not passing important headers to it (X-Forwarded-For,X-Forwarded-Proto). Such situation and solution could be found in this article and issue #2560...

提交回复
热议问题