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