caddy: Index | Files

package mime

import ""


Package Files

mime.go setup.go

type Config Uses

type Config map[string]string

Config represent a mime config. Map from extension to mime-type. Note, this should be safe with concurrent read access, as this is not modified concurrently.

type Mime Uses

type Mime struct {
    Next    httpserver.Handler
    Configs Config

Mime sets Content-Type header of requests based on configurations.

func (Mime) ServeHTTP Uses

func (e Mime) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)

ServeHTTP implements the httpserver.Handler interface.

Package mime imports 6 packages (graph) and is imported by 108 packages. Updated 2019-07-03. Refresh now. Tools for package owners.