How do you add a custom http header?

前端 未结 6 1048
天涯浪人
天涯浪人 2020-12-04 17:29

I\'m looking to add custom http headers to a Ruby on Rails app that is currently hosted on Heroku.

6条回答
  •  天涯浪人
    2020-12-04 18:12

    In rails 4, set the response headers in the application.rb or respective environment files. Once you done that, you can override the header value wherever you required in the controller. Refer this url for more details.

提交回复
热议问题