admin_ui

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 17 Imported by: 0

README

web

cd web npm install npm run build

How to use

Build caddy with this package

xcaddy build --with github.com/kingreatwill/caddy-modules/admin-ui@v1.0.3

Add a http config

{
        admin localhost:2019
}

:2018 {
    route {
        admin_ui
        reverse_proxy localhost:2019 {
            header_up Host localhost:2019
        }
    }
}

or 只允许GET,防止被修改

{
    debug
    admin localhost:2019
    order admin_ui before reverse_proxy
}

:2018 {
    admin_ui
    reverse_proxy localhost:2019 {
        method GET
        header_up Host localhost:2019
    }
}

Feature

  • Show Server Config
  • Show Upstream
  • Show PKI
  • Load Server Config and Save Config to Server
  • View Metrics from "/metrics"

Documentation

Index

Constants

View Source
const DirectiveName = "admin_ui"

Variables

This section is empty.

Functions

This section is empty.

Types

type CaddyAdminUI

type CaddyAdminUI struct {
	// The names of files to try as index files if a folder is requested.
	IndexNames []string `json:"index_names,omitempty"`

	// Append suffix to request filename if origin name is not exists.
	SuffixNames []string `json:"suffix_names,omitempty"`
	// contains filtered or unexported fields
}

CaddyAdminUI implements a static file server responder for Caddy.

func (CaddyAdminUI) CaddyModule

func (CaddyAdminUI) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*CaddyAdminUI) Provision

func (adminUI *CaddyAdminUI) Provision(ctx caddy.Context) error

Provision sets up the static files responder.

func (*CaddyAdminUI) ServeHTTP

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

Jump to

Keyboard shortcuts

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