mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
discourse: Fix the public directory path reported by Discourse
Change the path to the public directory reported by Discourse to its real path instead of the symlink in the store, since the store path won't be matched by any nginx rules. Fixes #142528.
This commit is contained in:
parent
f78d434764
commit
1fb77e822b
@ -266,6 +266,11 @@ let
|
||||
|
||||
# Make sure the notification email setting applies
|
||||
./notification_email.patch
|
||||
|
||||
# Change the path to the public directory reported by Discourse
|
||||
# to its real path instead of the symlink in the store, since
|
||||
# the store path won't be matched by any nginx rules
|
||||
./public_dir_path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
13
pkgs/servers/web-apps/discourse/public_dir_path.patch
Normal file
13
pkgs/servers/web-apps/discourse/public_dir_path.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/lib/file_store/local_store.rb b/lib/file_store/local_store.rb
|
||||
index 25649532c0..614e062dc1 100644
|
||||
--- a/lib/file_store/local_store.rb
|
||||
+++ b/lib/file_store/local_store.rb
|
||||
@@ -88,7 +88,7 @@ module FileStore
|
||||
end
|
||||
|
||||
def public_dir
|
||||
- File.join(Rails.root, "public")
|
||||
+ "/run/discourse/public"
|
||||
end
|
||||
|
||||
def tombstone_dir
|
Loading…
Reference in New Issue
Block a user