File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 79
79
80
80
function process_assets (app:: DashApp , path, compress:: Bool )
81
81
assets_path = " $(app. config. routes_pathname_prefix) " * strip (app. config. assets_url_path, ' /' ) * " /"
82
-
83
- filename = joinpath (app. config. assets_folder, replace (path, assets_path=> " " ))
84
- file_contents = read (filename)
85
- mimetype = HTTP. sniff (file_contents)
86
- headers = [" Content-Type" => mimetype]
87
-
88
- use_gzip = compress && occursin (r" text|javascript" , mimetype)
82
+ filename = joinpath (app. config. assets_folder, replace (path, assets_path=> " " ))
89
83
90
84
try
85
+ file_contents = read (filename)
86
+ mimetype = HTTP. sniff (file_contents)
87
+ use_gzip = compress && occursin (r" text|javascript" , mimetype)
88
+ headers = [" Content-Type" => mimetype]
91
89
return make_response (200 , headers, file_contents, use_gzip)
92
90
catch
93
91
return HTTP. Response (404 )
You can’t perform that action at this time.
0 commit comments