Allow --fallback as sole format option

This commit is contained in:
Seednode 2023-11-13 17:31:00 -06:00
parent f21594feef
commit aa6cb2aeef
3 changed files with 5 additions and 6 deletions

View File

@ -12,7 +12,7 @@ import (
)
const (
ReleaseVersion string = "3.2.9"
ReleaseVersion string = "3.2.10"
)
var (
@ -119,7 +119,7 @@ func init() {
rootCmd.CompletionOptions.HiddenDefaultCmd = true
rootCmd.MarkFlagsOneRequired("all", "audio", "code", "flash", "images", "text", "video")
rootCmd.MarkFlagsOneRequired("all", "audio", "code", "fallback", "flash", "images", "text", "video")
rootCmd.SilenceErrors = true
rootCmd.SetHelpCommand(&cobra.Command{

View File

@ -135,12 +135,12 @@ func realIP(r *http.Request) string {
remotePort := remoteAddr[len(remoteAddr)-1]
cfIP := r.Header.Get("Cf-Connecting-Ip")
cfIp := r.Header.Get("Cf-Connecting-Ip")
xRealIp := r.Header.Get("X-Real-Ip")
switch {
case cfIP != "":
return cfIP + ":" + remotePort
case cfIp != "":
return cfIp + ":" + remotePort
case xRealIp != "":
return xRealIp + ":" + remotePort
default:

View File

@ -88,7 +88,6 @@ func serveStaticFile(paths []string, index *fileIndex, errorChannel chan<- error
return
}
if !exists {
notFound(w, r, filePath)