fix
This commit is contained in:
parent
f6c0e89290
commit
8d1eb8dea5
@ -18,6 +18,7 @@ async function bootstrap() {
|
||||
"https://www.placebo.mk",
|
||||
"https://placebo.mk",
|
||||
"http://localhost:5173",
|
||||
'https://imkapi.oblak.solutions',
|
||||
],
|
||||
methods: "GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS",
|
||||
credentials: true,
|
||||
@ -27,6 +28,7 @@ async function bootstrap() {
|
||||
"Content-Type",
|
||||
"Accept",
|
||||
"Authorization",
|
||||
'Access-Control-Allow-Headers',
|
||||
"Access-Control-Allow-Origin",
|
||||
"Access-Control-Allow-Credentials",
|
||||
],
|
||||
|
||||
@ -30,6 +30,8 @@ services:
|
||||
- SMTP_USER=${SMTP_USER}
|
||||
- SMTP_PASS=${SMTP_PASS}
|
||||
- EMAIL_FROM=${EMAIL_FROM}
|
||||
- CORS_ORIGINS=http://localhost:5173,https://www.placebo.mk,https://placebo.mk
|
||||
- CORS_CREDENTIALS=true
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
@ -1,32 +1,32 @@
|
||||
// vite.config.js
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
// server: {
|
||||
// port: 5173,
|
||||
// proxy: {
|
||||
// "/api": {
|
||||
// target: "http://localhost:3000",
|
||||
// changeOrigin: true,
|
||||
// secure: false,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
build: {
|
||||
outDir: "dist",
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
vendor: ["react", "react-dom", "react-router-dom"],
|
||||
ui: ["@headlessui/react", "@heroicons/react"],
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "https://imkapi.oblak.solutions",
|
||||
changeOrigin: true,
|
||||
secure: false,
|
||||
ws: true,
|
||||
configure: (proxy, _options) => {
|
||||
proxy.on("error", (err, _req, _res) => {
|
||||
console.log("proxy error", err);
|
||||
});
|
||||
proxy.on("proxyReq", (proxyReq, req, _res) => {
|
||||
console.log("Sending Request to the Target:", req.method, req.url);
|
||||
});
|
||||
proxy.on("proxyRes", (proxyRes, req, _res) => {
|
||||
console.log(
|
||||
"Received Response from the Target:",
|
||||
proxyRes.statusCode,
|
||||
req.url,
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
define: {
|
||||
"process.env.API_URL": JSON.stringify("https://imkapi.oblak.solutions"),
|
||||
},
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user