mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- fix logstash web serving static files
This commit is contained in:
parent
05be9dcdab
commit
0fa8bc38b4
2 changed files with 3 additions and 4 deletions
5
Makefile
5
Makefile
|
@ -233,9 +233,8 @@ flatjar: build/logstash-$(VERSION)-flatjar.jar
|
|||
build/jar: | build build/flatgems build/monolith
|
||||
$(QUIET)mkdir build/jar
|
||||
$(QUIET)rsync -va build/flatgems/root/ build/flatgems/lib/ build/monolith/ build/ruby/ patterns build/flatgems/data build/jar/
|
||||
$(QUIET)(cd lib; rsync -a --delete logstash/web/public ../build/jar/logstash/web/public)
|
||||
$(QUIET)(cd lib; rsync -a --delete logstash/web/views ../build/jar/logstash/web/views)
|
||||
$(QUIET)(cd lib; rsync -a --delete logstash/certs ../build/jar/logstash/certs)
|
||||
$(QUIET)(cd lib; rsync -a --delete logstash/web/public logstash/web/views ../build/jar/logstash/web)
|
||||
$(QUIET)(cd lib; rsync -a --delete logstash/certs ../build/jar/logstash)
|
||||
|
||||
build/logstash-$(VERSION)-flatjar.jar: | build/jar
|
||||
$(QUIET)rm -f $@
|
||||
|
|
|
@ -11,7 +11,7 @@ class LogStash::Web::Server < Sinatra::Base
|
|||
|
||||
def static_file
|
||||
# request.path_info is the full path of the request.
|
||||
path = File.join(File.dirname(__FILE__), "..", "public", *request.path_info.split("/"))
|
||||
path = File.expand_path(File.join(File.dirname(__FILE__), "..", "public", *request.path_info.split("/")))
|
||||
#p :static => path
|
||||
if File.exists?(path)
|
||||
ext = path.split(".").last
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue