traefik_plugin_AdminAPI_WebUI

package module
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 11 Imported by: 0

README

AdminAPI_WebUI

add Admin API & Web UI for Traefik configured dynamic files!

This is a plugin for Traefik to add a Admin API & Web UI for Traefik as a middleware.

Usage

Configuration

Here is an example of a file provider dynamic configuration (given here in YAML), where the interesting part is the http.middlewares section:

# Dynamic configuration

http:
  routers:
    my-webui-router:
      rule: host(`admin.localhost`)
      service: noop@internal # required
      middlewares:
        - traefik_plugin_AdminAPI_WebUI

  middlewares:
    traefik_plugin_AdminAPI_WebUI:
      plugin:
        traefik_plugin_AdminAPI_WebUI:
          root: "/tmp/"
root

The root parameter is the root directory of dynamic configuration files.

Local test

There is a docker-compose.yml file to test the plugin locally:

docker-compose up -d

Then, you can go to http://admin.localhost to see the result.

Documentation

Overview

Upload config files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(_ context.Context, _ http.Handler, config *Config, _ string) (http.Handler, error)

Types

type Config

type Config struct {
	Root string `json:"root,omitempty"`
}

Config the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates the default plugin configuration.

Jump to

Keyboard shortcuts

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