mirror of
https://github.com/discourse/discourse.git
synced 2024-12-20 13:33:45 +08:00
13 lines
295 B
Ruby
13 lines
295 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
module Onebox
|
||
|
module Mixins
|
||
|
module GithubAuthHeader
|
||
|
def github_auth_header
|
||
|
return {} if SiteSetting.github_onebox_access_token.blank?
|
||
|
{ "Authorization" => "Bearer #{SiteSetting.github_onebox_access_token}" }
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|