Skip to content

Commit

Permalink
Don't append client/secret params for web requests
Browse files Browse the repository at this point in the history
  • Loading branch information
pengwynn committed Dec 20, 2013
1 parent 114d82b commit 9447206
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/octokit/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def request(method, path, data, options = {})
end
end

if application_authenticated?
if application_authenticated? && api_request?(path)
options[:query].merge! application_authentication
end

Expand Down Expand Up @@ -282,5 +282,9 @@ def parse_query_and_convenience_headers(options)
opts
end

def api_request?(path)
path =~ %r{(^\/)|#{api_endpoint}}
end

end
end

0 comments on commit 9447206

Please sign in to comment.