micro-plugins

command
v0.0.0-...-fabbfc5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

micro plugins

跨域

实现跨域,只需要在 micro api(micro API 网关)注册相关插件,并且通过命令行指定跨域相关信息即可。

plugin.Register(cors.NewPlugin())
go run main.go \
--cors-allowed-headers="Content-Type,X-Token" \
--cors-allowed-origins="*" \
--cors-allowed-methods="OPTIONS,DELETE,GET,POST" api

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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