You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For HttpHandlerStatic we cannot serve files for path different from root
Example, for next static_config:
fs-cache-main:
dir: /var/www # Path to the directory with files
update-period: 10s # update cache each N seconds
fs-task-processor: fs-task-processor # Run it on blocking task processor
handler-static: # Finally! Static handler.
fs-cache-component: fs-cache-main
path: /sub_path/d1/d2/d3/* # Registering handlers '/*' find files.
method: GET # Handle only GET requests.
task_processor: main-task-processor # Run it on CPU bound task processor
For request http://HOSTNAME/sub_path/d1/d2/d3/filename we will seach file /var/www/sub_path/d1/d2/d3/filename instead of intuitive /var/www/filename
It is due to HttpHandlerStatic using request.GetRequestPath() as path to search files in fs-cache:dir
To make possible to work on other base paths, we need to change file search path to GetPathArg
The text was updated successfully, but these errors were encountered:
Add a description
For
HttpHandlerStatic
we cannot serve files for path different from rootExample, for next static_config:
For request
http://HOSTNAME/sub_path/d1/d2/d3/filename
we will seach file/var/www/sub_path/d1/d2/d3/filename
instead of intuitive/var/www/filename
It is due to
HttpHandlerStatic
usingrequest.GetRequestPath()
as path to search files infs-cache:dir
To make possible to work on other base paths, we need to change file search path to GetPathArg
The text was updated successfully, but these errors were encountered: