/
githubmirror
/
GoFrame
Обзор
Документация
Войти
/
githubmirror
/
GoFrame
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
net/ghttp/ghttp_middleware_cors.go
13 строк
428 B
John Guo
add middleware for CORS with default options
22 фев 2022, 05:51
22 фев 2022, 05:51
4935416
Код
Авторство
О чём код?
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package ghttp // MiddlewareCORS is a middleware handler for CORS with default options. func MiddlewareCORS(r *Request) { r.Response.CORSDefault() r.Middleware.Next() }