mirror of
https://github.com/discourse/discourse.git
synced 2026-08-12 05:37:26 +08:00
Reddit blocks many server IPs from accessing their `.json` endpoint. This adds optional OAuth support using `client_credentials` flow so authenticated requests go through `oauth.reddit.com`, bypassing IP blocks. - Adds `reddit_onebox_client_id` and `reddit_onebox_client_secret` site settings - Bearer token is cached for 50 minutes (Reddit tokens last 60 min) - Falls back to unauthenticated `www.reddit.com` when credentials are not configured --------- Co-authored-by: Régis Hanol <regis@hanol.fr> |
||
|---|---|---|
| .. | ||
| engine | ||
| mixins | ||
| templates | ||
| domain_checker.rb | ||
| engine.rb | ||
| file_type_finder.rb | ||
| helpers.rb | ||
| json_ld.rb | ||
| layout.rb | ||
| layout_support.rb | ||
| matcher.rb | ||
| movie.rb | ||
| normalizer.rb | ||
| oembed.rb | ||
| open_graph.rb | ||
| preview.rb | ||
| sanitize_config.rb | ||
| status_check.rb | ||
| template_support.rb | ||
| view.rb | ||