Skip to content
Snippets Groups Projects
Commit 5f666d71 authored by Ben Whitmore's avatar Ben Whitmore
Browse files

Merge branch 'cors-error-uploading-issue-58' into 'main'

fix(upload): support manuscript upload for dev build on a server

Closes #58

See merge request !172
parents 854e146a 3163cf71
No related branches found
No related tags found
No related merge requests found
...@@ -55,3 +55,7 @@ x = await User.query().where({username:"0000000210481437"}).first() ...@@ -55,3 +55,7 @@ x = await User.query().where({username:"0000000210481437"}).first()
x.admin = true x.admin = true
x.save() x.save()
``` ```
## What should PUBLIC_CLIENT_HOST be set to?
This environment variable is currently only needed when deploying a _development_ build to a server (not to localhost). Set it to the server's name, e.g. `subdomain.myserver.com`.
...@@ -5,7 +5,7 @@ module.exports = { ...@@ -5,7 +5,7 @@ module.exports = {
}, },
'pubsweet-client': { 'pubsweet-client': {
protocol: 'CLIENT_PROTOCOL', protocol: 'CLIENT_PROTOCOL',
host: 'CLIENT_HOST', host: 'PUBLIC_CLIENT_HOST',
port: 'CLIENT_PORT', port: 'CLIENT_PORT',
}, },
'pubsweet-server': { 'pubsweet-server': {
......
...@@ -22,6 +22,7 @@ services: ...@@ -22,6 +22,7 @@ services:
- SERVER_PROTOCOL=http - SERVER_PROTOCOL=http
- SERVER_HOST=server - SERVER_HOST=server
- SERVER_PORT=${SERVER_PORT:-3000} - SERVER_PORT=${SERVER_PORT:-3000}
- PUBLIC_CLIENT_HOST=${PUBLIC_CLIENT_HOST:-0.0.0.0}
volumes: volumes:
- ./app:/home/node/app/app - ./app:/home/node/app/app
- ./config:/home/node/app/config - ./config:/home/node/app/config
......
...@@ -46,6 +46,7 @@ module.exports = (opts = {}) => { ...@@ -46,6 +46,7 @@ module.exports = (opts = {}) => {
'CLIENT_PROTOCOL', 'CLIENT_PROTOCOL',
'CLIENT_HOST', 'CLIENT_HOST',
'CLIENT_PORT', 'CLIENT_PORT',
'PUBLIC_CLIENT_HOST',
]), ]),
) )
......
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