Commit Graph

131 Commits

Author SHA1 Message Date
Sam Saffron ef08462b33 spaces matter 2017-02-23 17:37:53 -05:00
Sam eee22bf037 FEATURE: Add immutable cache for assets that do not update
This will eliminate revalidation of avatars, css, js and uploads on reloads on supporting browsers (at the moment firefox)
2017-02-23 12:24:47 -05:00
Régis Hanol 5e2545a578 FEATURE: improve support for (whitelisted) SVGs as images 2016-06-20 10:22:13 +02:00
Sam ba8aec2bc3 added comment for brotli support 2016-06-07 16:58:36 +10:00
Jeff Atwood 161170aabe Merge pull request #3928 from jamielinux/nginx204
Return 204 instead of 404 for favicon.ico requests
2016-01-30 01:48:22 -08:00
Guo Xiang Tan 9f05361f14 Allow sites to set HTTP basic authentication through nginx. 2016-01-08 12:49:17 +08:00
Sam 268e0f3b2b remove http 1.1 in case it has side effects 2016-01-05 07:54:12 +11:00
Sam b8471177dc clean up config file 2016-01-04 16:13:44 +11:00
Sam Saffron 0e2ded278d Don't buffer message bus, this allows us to stream 2016-01-04 09:56:30 +11:00
Sam Saffron ab5cd3ad3b allow http 1.1 via proxy 2016-01-04 09:52:11 +11:00
Jamie Nguyen eed86e9afc Do not log favicon.ico requests 2015-12-21 12:14:36 +00:00
Jamie Nguyen e8919df110 Return 204 instead of 404 for favicon.ico requests 2015-12-21 12:13:56 +00:00
Sam c7243bd6a2 Revert "cache cdn assets and strip cookies"
This reverts commit 18abf4f0d6.
2015-11-22 00:59:26 +11:00
Sam 18abf4f0d6 cache cdn assets and strip cookies 2015-11-22 00:33:20 +11:00
Sam 88f1a8f0b1 Merge pull request #3821 from mpalmer/letter-avatar-proxy
Proxy letter avatars by default
2015-11-19 20:02:16 +11:00
Sam Saffron 81bdd2328d FIX: stop sending a blank /favicon.ico
instead have nginx ship a 404 for it.
2015-11-17 19:34:05 +11:00
Matt Palmer 952d07599a More tweaks for the letter avatar proxy config 2015-11-06 14:14:20 +11:00
Matt Palmer c09f345cff Proxy letter avatars by default
On sites that don't otherwise configure an avatar fallback, Discourse will
now tell the client to get its letter avatars from a location which nginx
proxies to the centralised `avatars.discourse.org` service.  This alleviates
privacy concerns, whilst still providing some degree of performance benefit
(no need for every site to delay avatar response by 300ms for image
rendering).

It is still possible to gain the benefits of global image caching and the
lower latency of requesting directly from a CDN, by explicitly changing the
`external_system_avatars_url` site setting to
`https://avatars.discourse.org/letter/{first_letter}/{color}/{size}.png`.
2015-11-06 14:13:44 +11:00
Robin Ward 2866440968 Don't cache urls with `emoji` in them unless they are images 2015-09-08 13:12:32 -04:00
Sam 2c59ad3dd3 FIX: favicon update broken when favicon lived on a CDN 2015-08-25 11:54:23 +10:00
Sam abf269c5df only do magic headers for local assets, don't muck with logster's stuff 2015-08-12 18:48:34 +10:00
Robin Ward 822d77713c Put back `/srv/status` non-logging but include proxy details 2015-07-03 11:44:48 -04:00
Robin Ward 5f59424937 Don't disable logging for /srv/status 2015-07-03 11:02:07 -04:00
Robin Ward cf3aa867ab Don't log `/srv/status` 2015-06-30 12:12:55 -04:00
Sam db274c7969 missing $ 2015-06-16 19:30:29 +10:00
Sam f26eee8431 FEATURE: add username to NGINX logs 2015-06-16 17:43:53 +10:00
Sam dc563b4484 improve log format 2015-06-16 17:43:53 +10:00
Sam 4007484c54 also log user agent in NGINX 2015-06-16 16:43:43 +10:00
Sam a6ac368476 FEATURE: add a custom log format for better analysis 2015-06-16 11:37:08 +10:00
Sam e59d5fd0eb must also hide header so its not cached 2015-05-22 15:57:32 +10:00
Sam de3e48c16e PERF: NGINX caching invalid when server sets cookies 2015-05-22 14:23:47 +10:00
Régis Hanol 9ded21e4c6 FIX: consistent and future-proof upload storage pattern 2015-05-19 12:31:12 +02:00
Sam f58d85edea FEATURE: move stylesheet cache out of the uploads directory 2015-05-05 15:50:13 +10:00
Régis Hanol f036b23be5 FIX: add CORS header for .woff2 2015-03-27 13:30:18 +01:00
Sam a82530012a FEATURE: Allow selection of highlight js languages
PERF: stop loading highlight js on load

To get latest highlight js run bin/rake highlightjs:update
2015-03-13 16:18:59 +11:00
Sam 363fc03ab3 FEATURE: raise min body size to 10m 2015-02-23 10:50:09 +11:00
Jeff Atwood 1591068226 add commented out SSL section to nginx config 2015-01-17 01:26:21 -08:00
Régis Hanol 8d03ff6f82 FIX: cache emojis for 1 year 2014-12-28 11:10:03 +01:00
Sam 5551676fef FIX: cache all public resources registered by plugins.
Plugins are responsible for expiry
2014-12-09 14:49:02 +11:00
Régis Hanol acc62f2ec2 SECURITY: prevent direct download of backups 2014-12-03 12:47:28 +01:00
Sam e222d3d2c8 FIX: add vary encoding to gzip responses
this ensures CDNs work correctly see: http://blog.maxcdn.com/accept-encoding-its-vary-important/
2014-10-23 11:05:56 +11:00
Sam dc8eb6d737 FIX: backups not using x accl redirect 2014-09-24 16:51:41 +10:00
Sam cea5350a3c FIX: cache avatars in NGINX 2014-07-15 10:30:43 +10:00
Sam d4cd2f1ebf FEATURE: bump upload size to 3 megs 2014-07-14 14:32:55 +10:00
Sam 6a685e822a FIX: multisite uploads broken 2014-07-14 14:26:25 +10:00
Sam fb335560f8 FIX: appears broken in multisite 2014-07-12 11:11:12 +10:00
Sam d9768a6195 FIX: pretending to support too many accelerated files
This broke sidekiq web

(sidekiq serves resources out of /vendor/ path)
2014-07-11 18:47:55 +10:00
Sam 103e2ebba9 FIX: properly support sendfile on all routes
FIX: disable unused etags
2014-07-10 15:18:51 +10:00
Sam ebe3ee0b1c FIX: serve statically compressed files when available
PERF: default gzip to level 5
2014-07-08 16:45:44 +10:00
Sam 832a730e36 BUGFIX: re-enable CDN js debugging in a robust way
May be disabled if needed via site setting
2014-05-19 08:46:28 +10:00
Régis Hanol 986e8f2f0f Merge pull request #2338 from GitLaboratory/patch-2
Hide version of the web server
2014-05-15 15:22:44 +02:00
Sam f34862d195 FEATURE: get window.onerror working for CDNs 2014-05-15 12:59:26 +10:00
Il'ya A. Lykov 6a20aad67f Hide version of the web server 2014-05-14 12:08:29 +07:00
Sam e6418cd582 Merge pull request #2324 from kohenkatz/bugfix/puma-socket-name
Fix Puma socket name
2014-05-08 12:42:09 +10:00
MK 620e8aa73d Prevent IE Compatibility Mode
As discussed at https://meta.discourse.org/t/ie10-user-is-getting-your-browser-is-too-old/15289
2014-05-07 22:16:20 -04:00
MK baafa15bc3 Fix Puma socket name
As mentioned in f784a188c6 (commitcomment-5277066)
2014-05-07 21:58:49 -04:00
Sam 9cf23223eb BUGFIX: proxy_set_header is weird
in particular no inheritance IF proxy_set_header is specified in child
2014-03-25 17:06:15 +11:00
Sam 3830f41e5f BUGFIX: attachments bust under multisite 2014-03-25 10:37:31 +11:00
Régis Hanol faf03fdeb1 update NGINX sample to allow admin to download backups 2014-02-13 13:31:13 -08:00
Robin Ward 97dd560d84 Allow CORS on .ico files. Should help with Favcount.js 2014-01-23 10:41:22 -05:00
Sam 1b8a32ba19 correct nginx rule forwarding header 2014-01-09 16:39:30 +11:00
Sam e8afe87412 BUGFIX: attempt to forward on the protocol set by haproxy 2014-01-09 12:40:45 +11:00
Sam f1c5f4fa93 Merge pull request #1667 from cassiuschen/puma
Using Puma as Discourse's Webserver
2014-01-05 16:29:05 -08:00
Sam 051fb5bb5b cors for fonts, so firefox stays happy 2013-12-01 15:18:59 +11:00
cassiusChen f784a188c6 Locate the Puma config file. 2013-11-18 12:53:36 +08:00
Régis Hanol 125c848ee3 Update nginx.config.sample to allow custom CSS
cf. http://meta.discourse.org/t/changing-css-in-customize-section-has-no-effect/10036
2013-10-01 17:52:04 +02:00
Régis Hanol 45b838009c proper content-disposition header when downloading attachments 2013-09-06 19:23:56 +02:00
Michael Brown 95c246e257 Add section for additional MIME in nginx 2013-08-16 11:49:50 -04:00
Régis Hanol 3524b90d6a FIX: avatars in quotes/oneboxes
Avatars in quotes/oneboxes are still pointing to the old
`/users/:username/avatar(/:size)` route.
So, this adds back the old avatar route for the transition period.
2013-08-14 12:20:05 +02:00
Régis Hanol 71c33086b4 updated NGINX sample configuration 2013-08-13 22:09:44 +02:00
Michael Brown 08e41a707d Update documentation
* Change recommendation for install path to /var/www/discourse
* Fix instructions for redis-server installation
* Set yourself as system user during install
* Clarify some instructions
2013-08-07 00:06:40 -04:00
Michael Brown ddabc476bf Awesome documentation updates 2013-07-21 03:43:54 -04:00
J Bruni a42ed5d831 Fixed typo at nginx.sample.conf 2013-07-14 01:06:59 -03:00
Régis Hanol 6beb12e778 update nginx.sample.conf to take attachmetns into account 2013-07-10 22:59:54 +02:00
Michael Brown 836ebbaa8e Comment out example anti-hotlinking rules 2013-06-20 22:49:04 -04:00
Michael Brown a908f00771 Documentation update: work in progress 2013-06-15 01:25:41 -04:00
Michael Brown 73d6014d10 documentation: merge & adapt suggestions from baus 2013-05-29 00:07:26 -04:00
Chris Hunt ec223e5312 Fix unix socket paths in nginx upstream module
Unix socket paths only require a single forward slash according to the
HttpUpstreamModule documentation: http://wiki.nginx.org/HttpUpstreamModule
2013-05-28 11:37:03 -07:00
Chris Baus 71984bf01a Update nginx.sample.conf 2013-03-02 12:53:42 -08:00
Robin Ward 93a257707e Add X-Forwarded-Proto to nginx config to support SSL. Fixes #293 2013-02-28 11:24:03 -05:00
Robin Ward 21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00