Commit 5a9ce661 authored by TokaKaram's avatar TokaKaram

change cors setting

parent 3639d2d7
......@@ -9,7 +9,12 @@ const userRoutes = require("./src/routes/user");
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("/api/auth", authRoutes);
......
{
"schemaVersion": 2,
"dockerfileLines": [
"FROM node:22-alpine AS build-step",
"FROM node:22-alpine",
"WORKDIR /app",
"COPY . .",
"RUN cd frontend && npm install && npm run build",
"FROM socialengine/nginx-spa:latest",
"COPY --from=build-step /app/frontend/dist /app",
"RUN chmod -R 777 /app"
"RUN cd backend && npm install --production",
"EXPOSE 5000",
"CMD [\"sh\", \"-c\", \"cd backend && node src/app.js\"]"
]
}
\ 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