Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -18,7 +18,7 @@ func ConnectPostgres() (*sql.DB, error) {
|
|||||||
connStr := os.Getenv("POSTGRES_CONN")
|
connStr := os.Getenv("POSTGRES_CONN")
|
||||||
if connStr == "" {
|
if connStr == "" {
|
||||||
// fallback → sabit tanımlı bağlantı
|
// fallback → sabit tanımlı bağlantı
|
||||||
connStr = "host=127.0.0.1 port=5432 user=postgres password=tayitkan dbname=baggib2b sslmode=disable"
|
connStr = "host= 46.224.33.150 port=5432 user=postgres password=tayitkan dbname=baggib2b sslmode=disable"
|
||||||
//connStr = "host=172.16.0.3 port=5432 user=postgres password=tayitkan dbname=baggib2b sslmode=disable"
|
//connStr = "host=172.16.0.3 port=5432 user=postgres password=tayitkan dbname=baggib2b sslmode=disable"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
24
svc/main.go
24
svc/main.go
@@ -27,15 +27,33 @@ import (
|
|||||||
===========================================================
|
===========================================================
|
||||||
*/
|
*/
|
||||||
func enableCORS(h http.Handler) http.Handler {
|
func enableCORS(h http.Handler) http.Handler {
|
||||||
|
|
||||||
|
frontendURL := os.Getenv("APP_FRONTEND_URL")
|
||||||
|
|
||||||
|
// Default fallback (dev için)
|
||||||
|
if frontendURL == "" {
|
||||||
|
frontendURL = "http://localhost:9000"
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Println("🌍 CORS Allowed Origin:", frontendURL)
|
||||||
|
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
w.Header().Set("Access-Control-Allow-Origin", "http://localhost:9000")
|
origin := r.Header.Get("Origin")
|
||||||
w.Header().Set("Access-Control-Allow-Credentials", "true")
|
|
||||||
|
// Sadece izin verilen origin'e cevap ver
|
||||||
|
if origin == frontendURL {
|
||||||
|
w.Header().Set("Access-Control-Allow-Origin", origin)
|
||||||
|
w.Header().Set("Vary", "Origin")
|
||||||
|
w.Header().Set("Access-Control-Allow-Credentials", "true")
|
||||||
|
}
|
||||||
|
|
||||||
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
|
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
|
||||||
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
|
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
|
||||||
|
|
||||||
|
// Preflight
|
||||||
if r.Method == http.MethodOptions {
|
if r.Method == http.MethodOptions {
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusNoContent)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,83 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/**
|
|
||||||
* THIS FILE IS GENERATED AUTOMATICALLY.
|
|
||||||
* 1. DO NOT edit this file directly as it won't do anything.
|
|
||||||
* 2. EDIT the original quasar.config file INSTEAD.
|
|
||||||
* 3. DO NOT git commit this file. It should be ignored.
|
|
||||||
*
|
|
||||||
* This file is still here because there was an error in
|
|
||||||
* the original quasar.config file and this allows you to
|
|
||||||
* investigate the Node.js stack error.
|
|
||||||
*
|
|
||||||
* After you fix the original file, this file will be
|
|
||||||
* deleted automatically.
|
|
||||||
**/
|
|
||||||
|
|
||||||
|
|
||||||
// quasar.config.js
|
|
||||||
import { defineConfig } from "@quasar/app-webpack/wrappers";
|
|
||||||
var quasar_config_default = defineConfig(() => {
|
|
||||||
return {
|
|
||||||
// ✅ UYGULAMA KİMLİĞİ (WEB'DE GÖRÜNEN İSİM)
|
|
||||||
productName: "Baggi BSS",
|
|
||||||
productDescription: "Baggi Tekstil Business Support System",
|
|
||||||
// 🔹 Boot dosyaları
|
|
||||||
boot: ["axios", "dayjs"],
|
|
||||||
// 🔹 Global CSS
|
|
||||||
css: ["app.css"],
|
|
||||||
// 🔹 Ekstra icon/font setleri
|
|
||||||
extras: [
|
|
||||||
"roboto-font",
|
|
||||||
"material-icons"
|
|
||||||
],
|
|
||||||
// 🔹 Derleme Ayarları
|
|
||||||
build: {
|
|
||||||
vueRouterMode: "hash",
|
|
||||||
env: {
|
|
||||||
VITE_API_BASE_URL: "http://localhost:8080/api"
|
|
||||||
},
|
|
||||||
esbuildTarget: {
|
|
||||||
browser: ["es2022", "firefox115", "chrome115", "safari14"],
|
|
||||||
node: "node20"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 🔹 Geliştirme Sunucusu
|
|
||||||
devServer: {
|
|
||||||
server: { type: "http" },
|
|
||||||
port: 9e3,
|
|
||||||
open: true
|
|
||||||
},
|
|
||||||
// 🔹 Quasar Framework ayarları
|
|
||||||
framework: {
|
|
||||||
config: {
|
|
||||||
notify: { position: "top", timeout: 2500 }
|
|
||||||
},
|
|
||||||
lang: "tr",
|
|
||||||
plugins: ["Loading", "Dialog", "Notify"]
|
|
||||||
},
|
|
||||||
animations: [],
|
|
||||||
ssr: {
|
|
||||||
prodPort: 3e3,
|
|
||||||
middlewares: ["render"],
|
|
||||||
pwa: false
|
|
||||||
},
|
|
||||||
pwa: {
|
|
||||||
workboxMode: "GenerateSW"
|
|
||||||
},
|
|
||||||
capacitor: {
|
|
||||||
hideSplashscreen: true
|
|
||||||
},
|
|
||||||
electron: {
|
|
||||||
preloadScripts: ["electron-preload"],
|
|
||||||
inspectPort: 5858,
|
|
||||||
bundler: "packager",
|
|
||||||
builder: { appId: "baggisowtfaresystem" }
|
|
||||||
},
|
|
||||||
bex: {
|
|
||||||
extraScripts: []
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
|
||||||
export {
|
|
||||||
quasar_config_default as default
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user