charset_converter

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 8 Imported by: 0

README

Traefik Proxy Charset Converter Plugin

Overview

The Traefik Charset Converter Plugin is a middleware for Traefik that enables charset conversion of HTTP responses between different character encodings. It allows you to handle content encoding transformations to ensure your web applications can serve content in the desired character set, such as converting from ISO-8859-1 to UTF-8.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, next http.Handler, config *Config, name string) (http.Handler, error)

New creates a new instance of the Utf8ConverterMiddleware plugin.

Types

type Charset

type Charset struct {
	From string `json:"from,omitempty"`
	To   string `json:"to,omitempty"`
}

Rewrite holds one rewrite body configuration.

type Config

type Config struct {
	Charset Charset `json:"charset,omitempty"`
}

Config holds the plugin configuration.

func CreateConfig

func CreateConfig() *Config

CreateConfig creates a new instance of the plugin configuration.

type Utf8ConverterMiddleware

type Utf8ConverterMiddleware struct {
	// contains filtered or unexported fields
}

Utf8ConverterMiddleware is the plugin middleware. Utf8ConverterMiddleware is the plugin middleware.

func (*Utf8ConverterMiddleware) ServeHTTP

ServeHTTP handles incoming HTTP requests.

Jump to

Keyboard shortcuts

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