prodypanda / MarkEnti

MarkEnti is a comprehensive e-commerce platform designed to enable users to effortlessly create and manage their online storefronts.
https://markenti.com/
Other
1 stars 0 forks source link

(JS-D002) Misconfigured CORS in express #5

Open prodypanda opened 3 months ago

prodypanda commented 3 months ago

Description

Cross-Origin Resource Sharing(CORS) is a mechanism that enables web browsers to perform cross-domain requests using the XMLHttpRequest API in a controlled manner. It defines the protocol to use between a web browser and a server to determine whether a cross-origin request is allowed. Using *, null or google.com is not …

Occurrences

There is 1 occurrence of this issue in the repository.

See all occurrences on DeepSource → app.deepsource.com/gh/prodypanda/MarkEnti/issue/JS-D002/occurrences/

prodypanda commented 3 months ago

RECOMMENDED

const express = require('express');
const app = express();
app.get('/', function (req, res) {
    res.set('access-control-allow-origin', 'xyz.com');
});