aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-04-20Switch from deprecated get_if_addrs to if-addrsSven-Hendrik Haase1-1/+1
Fixes #1079.
2022-12-30Run cargo fmtSven-Hendrik Haase1-3/+2
2022-12-19Fix lintsSven-Hendrik Haase1-6/+6
2022-10-12Upgrade clap to v4Sven-Hendrik Haase1-1/+1
2022-09-20Tidy up some importsSven-Hendrik Haase1-5/+4
2022-09-14Fully qualify clap_complete::generateSven-Hendrik Haase1-2/+1
2022-09-14Fix typosKian-Meng Ang1-1/+1
Found via `codespell -L crate`.
2022-09-01Switch to `fast_qr` cratecyqsimon1-29/+4
2022-08-22Switch to `qrcode` libcyqsimon1-27/+25
2022-07-22Remove trailing space to appease `cargo fmt`cyqsimon1-1/+1
2022-07-22Apply suggestions from code reviewcyqsimon1-1/+4
Co-authored-by: Sven-Hendrik Haase <svenstaro@gmail.com>
2022-07-20Minor refactor on `run`cyqsimon1-36/+16
2022-07-20refactor `configure_app`cyqsimon1-44/+24
2022-05-18Fix security issue with --no-symlinksSven-Hendrik Haase1-0/+19
Even with --no-symlinks specified, if a direct path to a symlink had been entered, it would be resolved. This fixes that behavior and improves tests to ensure this behavior.
2022-02-20Add man page support using --print-manpage (fixes #730)Sven-Hendrik Haase1-0/+7
2022-02-16Bump depsSven-Hendrik Haase1-1/+1
2022-02-06Fix route_prefix for css and faviconAli MJ Al-Nasrawy1-5/+2
2022-02-05update to actix-web v4.0-rc.2Ali MJ Al-Nasrawy1-4/+4
2022-01-03Apply requested changesjikstra1-7/+1
2022-01-03Upgrade clapSven-Hendrik Haase1-1/+1
2021-12-29Implement --route-prefix to set specific route prefixjikstra1-4/+7
2021-12-28Bump actix-web to v4.0-beta.15jikstra1-4/+10
Co-authored-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-12-28Bump actix-web to v4.0-beta.9Ali MJ Al-Nasrawy1-4/+0
2021-12-10Fixes type in main.rsSam Schlinkert1-1/+1
"Availabe" -> "Available"
2021-10-25Refactor SPA-mode to make it more ergonomicSven-Hendrik Haase1-14/+22
2021-10-18Update clapSven-Hendrik Haase1-16/+5
2021-10-18Use Path instead of PathBuf for parameterBilly Bradley1-3/+4
2021-10-14Fix formattingBilly Bradley1-1/+1
2021-10-13revert unnecessary changesAli MJ Al-Nasrawy1-5/+5
2021-10-10Use NamedFile as default handler to simplify --spa-index option implementationBilly Bradley1-17/+5
2021-10-08Add --spa-index optionBilly Bradley1-10/+37
2021-08-31Print inverted QR codes side-by-sideAli MJ Al-Nasrawy1-5/+15
2021-08-31Address review commentsAli MJ Al-Nasrawy1-1/+1
2021-08-31Print QR code to terminalAli MJ Al-Nasrawy1-2/+42
2021-08-31Simplify custom headersAli MJ Al-Nasrawy1-11/+4
Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-08-30Exclude embedded routes from authenticationAli MJ Al-Nasrawy1-48/+30
2021-08-30Fix clippy::too_many_arguments and rework error ..Ali MJ Al-Nasrawy1-95/+8
... page rendering Too many arguments are moved around and many of them are already stored in MiniserveConfig. Many of these are used to render error pages. To fix this issue, it was necessary to rework error page rendering: 1. Implement `ResponseError` for `ContextualError` so that it can be returned from service handlers as is and will then be automatically logged to the console and converted into an error response. 2. At service handler level, all error responses are now rendered as plain text. 3. 'error_page_middleware' is now responsible for the rendering of the final error page from plain text reponses. Signed-off-by: Ali MJ Al-Nasrawy <alimjalnasrawy@gmail.com>
2021-08-30Implement show symlink destinationDean Li1-0/+2
Add option `show_symlink_info` to represent show symlink info or not. (Default to no) Show symlink destination after symlink symbol in directory listing Resemble `ls -l` and also the short argument select for this feature is also `-l`. Basic testing is included. Related to #499
2021-08-30address review commentAli MJ Al-Nasrawy1-8/+14
2021-08-30order interface verticallyAli MJ Al-Nasrawy1-3/+3
2021-08-30add comment to create_tcp_listenerAli MJ Al-Nasrawy1-0/+4
2021-08-30Use exit codes for failureAli MJ Al-Nasrawy1-4/+5
2021-08-30Show IP addresses of all local interfacesAli MJ Al-Nasrawy1-48/+43
.. when binding to wildcard addresses (:: or 0.0.0.0) * Remove local variable `interfaces` because it is no longer used multiple times.
2021-08-30Fix default binding behaviourAli MJ Al-Nasrawy1-5/+22
On some platforms, binding to to both "::" and "0.0.0.0" at the same time is not allowed because "::" may already accepts ipv4 connections. For other platforms, binding to both is necessary to support ipv4 and ipv6. This platform-specific behaviour is due to the variation in the default value for the socket option "IPV6_ONLY". Fix this by always setting the "IPv6_ONLY" sockopt to true!
2021-08-30Fix -i 0.0.0.0Ali MJ Al-Nasrawy1-23/+4
Don't use `interfaces`, use `miniserve_config.interfaces` instead! Otherwise, "0.0.0.0" is converted to "localhost"!
2021-08-30Fail if any address fails to bindAli MJ Al-Nasrawy1-18/+13
2021-08-30Switch from structopt to clap v3Sven-Hendrik Haase1-5/+18
2021-08-29list directory if index not foundAli MJ Al-Nasrawy1-18/+18
2021-08-28file_upload.rs: use async/awaitAli MJ Al-Nasrawy1-2/+2
... and rewrite {save_file, handle_multipart} ... and fix clippy warning about create_error_response() being always Ok()
2021-08-28migrate to actix-web v4.0-betaAli MJ Al-Nasrawy1-9/+10