confindex

package module
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

README

Confidentiality Plugin for Caddy

Config

Add order confidentiality after encode to root level and add confidentiality <classification> to the servers you want to have the index on.

Example:

{
    order confidentiality after encode
}

http://localhost:2015 {
    confidentiality internal
    root * www/
    file_server
}

Supported classifications:

  • internal
  • restricted
  • confidential

Testing

You can test locally using following command:

xcaddy run -config test/Caddyfile -adapter caddyfile

You may need to install/update xcaddy first:

go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest

License


   Copyright 2021 Toowoxx IT GmbH

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Confidentiality

type Confidentiality string
const (
	Internal     Confidentiality = "internal"
	Restricted   Confidentiality = "restricted"
	Confidential Confidentiality = "confidential"
)

func ToConfidentiality

func ToConfidentiality(str string) (Confidentiality, error)

func (Confidentiality) ToScriptKey

func (c Confidentiality) ToScriptKey() string

type Middleware

type Middleware struct {
	ConfidentialityStr string `json:"confidentiality"`
	Confidentiality    Confidentiality
	// contains filtered or unexported fields
}

func (Middleware) CaddyModule

func (Middleware) CaddyModule() caddy.ModuleInfo

func (Middleware) HandleLine

func (m Middleware) HandleLine(line string) (string, error)

func (*Middleware) Provision

func (m *Middleware) Provision(ctx caddy.Context) error

func (Middleware) ServeHTTP

func (m Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

func (*Middleware) UnmarshalCaddyfile

func (m *Middleware) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

func (*Middleware) Validate

func (m *Middleware) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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