* #365 Updated documentation for changing ports. Updated the nuxt config to use separate internal and external api urls * #365 Switch to using relative urls --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
parent
ae18bcbb8d
commit
75c2107b6c
|
|
@ -1,6 +1,7 @@
|
||||||
NUXT_LOG_LEVEL=
|
NUXT_LOG_LEVEL=
|
||||||
NUXT_PUBLIC_APP_URL=http://localhost/
|
NUXT_PUBLIC_APP_URL=/
|
||||||
NUXT_PUBLIC_API_BASE=http://localhost/api
|
NUXT_PUBLIC_API_BASE=/api
|
||||||
|
NUXT_PRIVATE_API_BASE=http://localhost/api
|
||||||
NUXT_PUBLIC_AI_FEATURES_ENABLED=false
|
NUXT_PUBLIC_AI_FEATURES_ENABLED=false
|
||||||
NUXT_PUBLIC_AMPLITUDE_CODE=
|
NUXT_PUBLIC_AMPLITUDE_CODE=
|
||||||
NUXT_PUBLIC_CRISP_WEBSITE_ID=
|
NUXT_PUBLIC_CRISP_WEBSITE_ID=
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export function getOpnRequestsOptions(request, opts) {
|
||||||
addPasswordToFormRequest(request, opts)
|
addPasswordToFormRequest(request, opts)
|
||||||
addCustomDomainHeader(request, opts)
|
addCustomDomainHeader(request, opts)
|
||||||
|
|
||||||
if (!opts.baseURL) opts.baseURL = config.public.apiBase
|
if (!opts.baseURL) opts.baseURL = config.privateApiBase || config.public.apiBase
|
||||||
|
|
||||||
return {
|
return {
|
||||||
async onResponseError({response}) {
|
async onResponseError({response}) {
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,5 @@ export default {
|
||||||
* Used to authenticate that the requests are coming from the server - not from a client.
|
* Used to authenticate that the requests are coming from the server - not from a client.
|
||||||
*/
|
*/
|
||||||
apiSecret: process.env.NUXT_API_SECRET || '',
|
apiSecret: process.env.NUXT_API_SECRET || '',
|
||||||
|
privateApiBase: process.env.NUXT_PRIVATE_API_BASE || null,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ nvm use 20
|
||||||
|
|
||||||
cd /app/nuxt/server/
|
cd /app/nuxt/server/
|
||||||
|
|
||||||
|
export NUXT_PRIVATE_API_BASE=http://localhost/api
|
||||||
|
|
||||||
echo + . /app/client/.env
|
echo + . /app/client/.env
|
||||||
[ -f /app/client/.env ] && . /app/client/.env || echo "Environment file missing!"
|
[ -f /app/client/.env ] && . /app/client/.env || echo "Environment file missing!"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue