Skip to content
Snippets Groups Projects
Commit ccfd38a6 authored by Levatax's avatar Levatax
Browse files

refactor: move origin to env

parent bf247989
Branches
Tags
No related merge requests found
ALLOWED_ORIGINS=https://yourdomain.com
\ No newline at end of file
.env
\ No newline at end of file
......@@ -5,9 +5,7 @@ import (
"log"
)
var (
db *leveldb.DB
)
var db *leveldb.DB
func InitDB(path string) error {
var err error
......
......@@ -17,7 +17,7 @@ func main() {
app := fiber.New()
app.Use(cors.New(cors.Config{
AllowOrigins: "https://hizla.io",
AllowOrigins: os.Getenv("ALLOWED_ORIGINS"),
AllowHeaders: "Origin, Content-Type, Accept",
}))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment