utils

package
v0.0.0-...-ea924cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableDangerousForSslRewriteRules

func DisableDangerousForSslRewriteRules(content []string) ([]string, bool)

func Escape

func Escape(filePath string) string

func GetIPFromListen

func GetIPFromListen(listen string) string

GetIPFromListen returns IP address from Listen directive statement

func IsPortListened

func IsPortListened(listens []string, port string) bool

IsPortListened checks if port in the list

func IsRewriteRuleDangerousForSsl

func IsRewriteRuleDangerousForSsl(line string) bool

IsRewriteRuleDangerousForSsl checks if provided rewrite rule potentially can not be used for the virtual host with ssl e.g: RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [L,QSA,R=permanent] Copying the above line to the ssl vhost would cause a redirection loop.

func RemoveClosingHostTag

func RemoveClosingHostTag(lines []string)

RemoveClosingHostTag removes closing tag </virtualhost> for the virtualhost block

func TranslateFnmatchToRegex

func TranslateFnmatchToRegex(fnmatchStr string) string

TranslateFnmatchToRegex converts a shell PATTERN to a regular expression string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL