2019-08-15 14:42:30 +05:30
|
|
|
import { homeLocation } from '../../../config/env';
|
|
|
|
|
2015-08-04 01:25:34 -07:00
|
|
|
export default function constantHeaders() {
|
|
|
|
return function(req, res, next) {
|
2019-08-15 14:42:30 +05:30
|
|
|
res.header('Access-Control-Allow-Origin', homeLocation);
|
|
|
|
res.header('Access-Control-Allow-Credentials', true);
|
2019-02-18 19:32:49 +00:00
|
|
|
res.header(
|
|
|
|
'Access-Control-Allow-Headers',
|
2015-08-04 01:25:34 -07:00
|
|
|
'Origin, X-Requested-With, Content-Type, Accept'
|
|
|
|
);
|
|
|
|
next();
|
|
|
|
};
|
|
|
|
}
|