Skip to content

Commit

Permalink
Default root to local assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jul 14, 2024
1 parent 0c33b8a commit 772d1c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/lively/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class Assets < Protocol::HTTP::Middleware
".mp3" => "audio/mpeg",
}

def initialize(delegate, root: Dir.pwd, content_types: DEFAULT_CONTENT_TYPES, cache_control: DEFAULT_CACHE_CONTROL)
PUBLIC_ROOT = File.expand_path('../../public', __dir__)

def initialize(delegate, root: PUBLIC_ROOT, content_types: DEFAULT_CONTENT_TYPES, cache_control: DEFAULT_CACHE_CONTROL)
super(delegate)

@root = root
Expand Down

0 comments on commit 772d1c9

Please sign in to comment.