mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
feat: support customize http log format (#116)
This commit is contained in:
20
README.md
20
README.md
@@ -64,9 +64,10 @@ OPTIONS:
|
||||
--render-index Serve index.html when requesting a directory, returns 404 if not found index.html
|
||||
--render-try-index Serve index.html when requesting a directory, returns directory listing if not found index.html
|
||||
--render-spa Serve SPA(Single Page Application)
|
||||
--completions <shell> Print shell completion script for <shell> [possible values: bash, elvish, fish, powershell, zsh]
|
||||
--tls-cert <path> Path to an SSL/TLS certificate to serve with HTTPS
|
||||
--tls-key <path> Path to the SSL/TLS certificate's private key
|
||||
--log-format <format> Customize http log format
|
||||
--completions <shell> Print shell completion script for <shell> [possible values: bash, elvish, fish, powershell, zsh]
|
||||
-h, --help Print help information
|
||||
-V, --version Print version information
|
||||
```
|
||||
@@ -187,6 +188,23 @@ dufs -a /@admin:pass1@* -a /ui@designer:pass2 -A
|
||||
- Account `admin:pass1` can upload/delete/view/download any files/folders.
|
||||
- Account `designer:pass2` can upload/delete/view/download any files/folders in the `ui` folder.
|
||||
|
||||
## Log format
|
||||
|
||||
dufs supports customize http log format via option `--log-format`.
|
||||
|
||||
The default format is `$remote_addr "$request" $status`.
|
||||
|
||||
All variables list below:
|
||||
|
||||
| name | description |
|
||||
| ------------ | ------------------------------------------------------------------------- |
|
||||
| $remote_addr | client address |
|
||||
| $remote_user | user name supplied with authentication |
|
||||
| $request | full original request line |
|
||||
| $status | response status |
|
||||
| $http_ | arbitrary request header field. examples: $http_user_agent, $http_referer |
|
||||
|
||||
> use `dufs --log-format=''` to disable http log
|
||||
## License
|
||||
|
||||
Copyright (c) 2022 dufs-developers.
|
||||
|
||||
Reference in New Issue
Block a user