Skip to content
Snippets Groups Projects
Commit e0e25e30 authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

fix(server): use correct env variable for cors

parent c9bd23a0
No related branches found
No related tags found
3 merge requests!52Docx,!40fix(server): use correct env variable for cors,!17Graphql api
const config = require('config') const config = require('config')
const createCORSConfig = () => { const createCORSConfig = () => {
if (!config.has('pubsweet-client.url')) return null if (!config.has('clientUrl')) return null
const clientUrl = config.has('clientUrl') && config.get('clientUrl')
return { return {
origin: clientUrl, origin: config.get('clientUrl'),
credentials: true, credentials: true,
} }
} }
......
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