Skip to content
m1dsummerPublic
forked from flamego/cors

About

Package cors is a middleware that provides the Cross-Origin Resource Sharing for Flamego

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

cors

GitHub Workflow Status Codecov GoDoc Sourcegraph

Package cors is a middleware that provides the Cross-Origin Resource Sharing for Flamego.

Installation

The minimum requirement of Go is 1.16.

go get github.com/flamego/cors

Getting started

package main

import (
	"github.com/flamego/cors"
	"github.com/flamego/flamego"
)

func main() {
	f := flamego.Classic()
	f.Use(cors.CORS())
	f.Get("/", func(c flamego.Context) string {
		return "ok"
	})
	f.Run()
}

Getting help

License

This project is under the MIT License. See the LICENSE file for the full license text.

About

Package cors is a middleware that provides the Cross-Origin Resource Sharing for Flamego

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages