* Do path joins more safely
* Improve path cleaning and tests
* Lower-case error message
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
* Correct handle potential errors in `get_path`
* Use `expect` in tests, rather than `unwrap`
* Correctly handle invalid upload path without panic
* Correctly handle filesystem create errors
* Use result rather than option to allow easier error handling
---------
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
* feat(log): use 'tracing-subscriber' instead of 'env_logger'
resolves#161
* feat: use 'tracing' instead of 'log'
* feat: make 'INFO' the default log level
* feat(server): support multiple auth tokens
Example:
```toml
[server]
auth_tokens = [
"super_secret_token1",
"super_secret_token2",
]
```
The previously used `AUTH_TOKEN` environment variable can still be used
and will be evaluated as well.
* fixtures: add all tokens in array to the test
* add deprecation warning for auth_token
* also add deprecation warnings at server startup
* fix formatting
* fixed tests, so that we do not use deprecated config options
* use bash array
* refactor: use separate function
* refactor: check auth tokens
* Update fixtures/test-server-auth-multiple-tokens/test.sh
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
* refactor: convert functions to methods
* refactor: check function
* refactor: get_tokens method
* style(format): add newline between functions
* refactor(server): print deprecation warnings once
---------
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
* honor X-Forward-* headers
Behind a reverse proxy, the log entries always showed the IP address of the reverse proxy.
With this change the real IP address of the client is shown.
Since the IP address is only used for info in the log, there are no security implications.
* style(format): apply formatting
---------
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
* feat(deploy): deploy on shuttle.rs
* chore(deploy): add automated shuttle deploy workflow
* style(readme): update the formatting in README.md
* chore(deploy): optimize shuttle workflow
* fix(deploy): start the project
* fix(deploy): remove start step
This reverts commit 4f25921aeb.
* chore(deploy): expose the version for the public instance
* docs(lib): update the comment for shuttle entry-point
* chore(deploy): run the shuttle deployment on new tag
feat(server): support auto-deletion of expired files (#17)
chore(ci): set the number of test threads to 1
feat(config): allow the real-time update of cleanup routine
docs(readme): update README.md about deleting expired files