mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Merge pull request #3928 from jamielinux/nginx204
Return 204 instead of 404 for favicon.ico requests
This commit is contained in:
commit
161170aabe
1 changed files with 4 additions and 4 deletions
|
@ -80,11 +80,11 @@ server {
|
||||||
internal;
|
internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
# return a cheap 404 for favicon cause lots of browsers like asking for it
|
# bypass rails stack with a cheap 204 for favicon.ico requests
|
||||||
# view source and old browsers, this bypasses the rails stack at the expense of
|
|
||||||
# having an ugly 404 page
|
|
||||||
location /favicon.ico {
|
location /favicon.ico {
|
||||||
return 404;
|
return 204;
|
||||||
|
access_log off;
|
||||||
|
log_not_found off;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue