🔍RepoLensrepolens.ru
  • /trending
  • /top500
  • /weekly
  • /categories
  • /about

© 2026 RepoLens · repolens.ru

root@repolens:~# updating the stack

@exvadimka

Данные обновляются автоматически через GitHub API

← к каталогу

📦 cors/ gin-contrib

Official CORS gin's middleware

Открыть на GitHub ↗обновлён 1мес назад
Звёзды
★ 2.0k
Форки
188
За неделю
—
За месяц
—
Рост %
—
Язык
Go

Установка и запуск

Installation

go get github.com/gin-contrib/cors

Import in your Go code:

import "github.com/gin-contrib/cors"

Quick Start

Allow all origins (default):

import (
  "github.com/gin-contrib/cors"
  "github.com/gin-gonic/gin"
)

func main() {
  router := gin.Default()
  router.Use(cors.Default()) // All origins allowed by default
  router.Run()
}

⚠️ Warning: Allowing all origins disables cookies for clients. For credentialed requests, do not allow all origins.


Из README репозитория · полный README на GitHub