FEATURE: Add custom User-Agent to Discourse Oneboxes

This commit is contained in:
Robin Ward 2017-05-24 12:19:17 -04:00
parent 4266828c62
commit 8bc93c0b01
2 changed files with 3 additions and 2 deletions

View File

@ -214,7 +214,7 @@ GEM
omniauth-twitter (1.3.0)
omniauth-oauth (~> 1.1)
rack
onebox (1.8.6)
onebox (1.8.8)
fast_blank (>= 1.0.0)
htmlentities (~> 4.3)
moneta (~> 1.0)

View File

@ -2,5 +2,6 @@ require_dependency 'twitter_api'
Onebox.options = {
twitter_client: TwitterApi,
redirect_limit: 1
redirect_limit: 1,
user_agent: "Discouse Forum Onebox v#{Discourse::VERSION::STRING}"
}