Commit 5a9ce661 authored by TokaKaram's avatar TokaKaram

change cors setting

parent 3639d2d7
...@@ -9,7 +9,12 @@ const userRoutes = require("./src/routes/user"); ...@@ -9,7 +9,12 @@ const userRoutes = require("./src/routes/user");
const app = express(); const app = express();
app.use(cors()); app.use(
cors({
origin: process.env.FRONTEND_URL || "http://localhost:3000",
credentials: true,
})
);
app.use(express.json()); app.use(express.json());
app.use("/api/auth", authRoutes); app.use("/api/auth", authRoutes);
......
{ {
"schemaVersion": 2, "schemaVersion": 2,
"dockerfileLines": [ "dockerfileLines": [
"FROM node:22-alpine AS build-step", "FROM node:22-alpine",
"WORKDIR /app", "WORKDIR /app",
"COPY . .", "COPY . .",
"RUN cd frontend && npm install && npm run build", "RUN cd backend && npm install --production",
"FROM socialengine/nginx-spa:latest", "EXPOSE 5000",
"COPY --from=build-step /app/frontend/dist /app", "CMD [\"sh\", \"-c\", \"cd backend && node src/app.js\"]"
"RUN chmod -R 777 /app"
] ]
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment