mirror of
https://github.com/wisplite/raster.git
synced 2026-05-01 06:32:44 -05:00
login/logout logic, breadcrumbs, initial ui stuff
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/gin-contrib/cors"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/wisplite/raster/internal/db"
|
||||
"github.com/wisplite/raster/internal/routes"
|
||||
@@ -15,6 +16,15 @@ func main() {
|
||||
|
||||
r := gin.Default()
|
||||
|
||||
// Configure CORS middleware
|
||||
r.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"http://localhost:3000", "http://localhost:5173"},
|
||||
AllowMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
|
||||
AllowHeaders: []string{"Origin", "Content-Type", "Accept", "Authorization"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
routes.RegisterRoutes(r)
|
||||
|
||||
r.Run(":8080")
|
||||
|
||||
Reference in New Issue
Block a user