Skip to content

Commit

Permalink
update: update request origin for cors
Browse files Browse the repository at this point in the history
  • Loading branch information
khayss committed Jun 14, 2024
1 parent 38087b9 commit dd2930a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ const app = express();

/* Middlewares */
app
.use(cors({ origin: "http://localhost:3001", credentials: true }))
.use(
cors({
origin: "https://food-app-front-end-sand.vercel.app/",
credentials: true,
})
)
.use(morgan("dev")) // Logging requests and response
.use(express.json()) // Parse incoming requests with JSON payload
.use(express.urlencoded({ extended: true })) // Parses incoming requests with urlencoded payloads
Expand Down

0 comments on commit dd2930a

Please sign in to comment.