Skip to content

Commit

Permalink
chore: typos
Browse files Browse the repository at this point in the history
Signed-off-by: Valery Piashchynski <[email protected]>
  • Loading branch information
rustatian committed Jul 5, 2024
1 parent 1590e69 commit 000bd7e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ type Config struct {
// Weak etag `W/`
Weak bool `mapstructure:"weak"`

// forbid specifies list of file extensions which are forbidden for access.
// example: .php, .exe, .bat, .htaccess and etc.
// forbid specifies a list of file extensions which are forbidden for access.
// example: .php, .exe, .bat, .htaccess etc.
Forbid []string `mapstructure:"forbid"`

// Allow specifies list of file extensions which are allowed for access.
// example: .php, .exe, .bat, .htaccess and etc.
// Allow specifies a list of file extensions which are allowed for access.
// example: .php, .exe, .bat, .htaccess etc.
Allow []string `mapstructure:"allow"`

// Request headers to add to every static.
Expand Down
6 changes: 3 additions & 3 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Logger interface {

// Plugin serves static files. Potentially convert into middleware?
type Plugin struct {
// server configuration (location, forbidden files and etc)
// server configuration (location, forbidden files etc)
cfg *Config
log *zap.Logger

Expand All @@ -50,7 +50,7 @@ type Plugin struct {
prop propagation.TextMapPropagator
}

// Init must return configure service and return true if service hasStatus enabled. Must return error in case of
// Init must return configure service and return true if the service hasStatus enabled. Must return error in case of
// misconfiguration. Services must not be used without proper configuration pushed first.
func (s *Plugin) Init(cfg Configurer, log Logger) error {
const op = errors.Op("static_plugin_init")
Expand Down Expand Up @@ -130,7 +130,7 @@ func (s *Plugin) Middleware(next http.Handler) http.Handler { //nolint:gocognit,
r = r.WithContext(ctx)
}

// do not allow paths like ../../resource
// do not allow paths like '../../resource'
// only specified folder and resources in it
// https://lgtm.com/rules/1510366186013/
if strings.Contains(r.URL.Path, "..") {
Expand Down

0 comments on commit 000bd7e

Please sign in to comment.