Skip to content
/ cors Public

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

License

Notifications You must be signed in to change notification settings

flamego/cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cors

GitHub Workflow Status GoDoc

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

Installation

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

Topics

Resources

License

Stars

Watchers

Forks

Contributors 6

Languages