concat

package module
v0.0.0-...-c73ae1f Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

caddy-concat

This is a plugin for caddy, just like https://github.com/alibaba/nginx-http-concat

Download

https://github.com/MrToy/caddy-concat/releases

Usage

Caddyfile:

http://localhost {
    cors
}

Requirement

  • golang

Build

Step1
go get
Step2

在 $GOPATH/src/github.com/mholt/caddy/caddyhttp/httpserver/plugin.go 文件里的directives(约635行的位置)添加"concat"

Step3
#GOOS 可能为 linux、windows、darwin
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o caddy ./cmd

得到caddy可执行文件

Step4

将caddy文件添加到环境变量

Note

如果需要添加插件,在cmd/main.go里添加

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Concat

type Concat struct {
	Next httpserver.Handler
}

func (Concat) ServeHTTP

func (ctx Concat) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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