discourse/config
jbrw 68d0916eb5
FEATURE: Oneboxer cache response body (#12562)
* FEATURE: Cache successful HTTP GET requests during Oneboxing

Some oneboxes may fail if when making excessive and/or odd requests against the target domains. This change provides a simple mechanism to cache the results of succesful GET requests as part of the oneboxing process, with the goal of reducing repeated requests and ultimately improving the rate of successful oneboxing.

To enable:

Set `SiteSetting.cache_onebox_response_body` to `true`

Add the domains you’re interesting in caching to `SiteSetting. cache_onebox_response_body_domains` e.g. `example.com|example.org|example.net`

Optionally set `SiteSetting.cache_onebox_user_agent` to a user agent string of your choice to use when making requests against domains in the above list.

* FIX: Swap order of duration and value in redis call

The correct order for `setex` arguments is `key`, `duration`, and `value`.

Duration and value had been flipped, however the code would not have thrown an error because we were caching the value of `1.day.to_i` for a period of 1 seconds… The intention appears to be to set a value of 1 (purely as a flag) for a period of 1 day.
2021-03-31 13:19:34 -04:00
..
cloud/cloud66 DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
environments FEATURE: support DISCOURSE_SMTP_FORCE_TLS option (#11733) 2021-01-18 11:56:18 -05:00
initializers DEV: Retry-after header values should be strings (#12475) 2021-03-23 20:32:36 +01:00
locales UX: remove reference to contact form in settings (#12554) 2021-03-30 14:18:06 -04:00
application.rb DEV: Correct the ruby version check (#12551) 2021-03-30 09:44:53 +02:00
boot.rb DEV: Remove deprecated bootsnap options (#11929) 2021-02-02 14:39:51 +01:00
cdn.yml.sample
database.yml DEV: Disable migration advisory locks in dev and test environment. 2020-08-25 14:20:58 +08:00
deploy.rb.sample
discourse.config.sample
discourse.pill.sample
discourse_defaults.conf FEATURE: Allow a cluster_name to be configured and used for /srv/status (#12365) 2021-03-15 15:41:59 +11:00
environment.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
logrotate.conf
multisite.yml.production-sample DEV: Remove `db_id` from sample multisite config. 2020-05-29 10:48:29 +08:00
nginx.global.conf
nginx.sample.conf DEV: add CORS header for all nginx rules of public folder files. (#12205) 2021-02-25 02:57:37 +05:30
projections.json DEV: Use .hbr for raw template file extension (#8883) 2020-02-11 13:38:12 -06:00
puma.rb remove daemonize setting (#12232) 2021-03-01 16:42:50 +11:00
routes.rb FEATURE: Check email availability in signup form (#12328) 2021-03-22 17:46:03 +02:00
sidekiq.yml FEATURE: introduce ultra_low priority queue 2019-01-17 14:53:19 +11:00
site_settings.yml FEATURE: Oneboxer cache response body (#12562) 2021-03-31 13:19:34 -04:00
spring.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
thin.yml.sample
unicorn.conf.rb DEV: Enable unicorn logger in test environment 2021-02-11 15:24:15 +01:00
unicorn_launcher
unicorn_upstart.conf