diff --git a/README.md b/README.md index 58a8c1e..075c727 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,8 @@ Instances of jskos-proxy are configured with environment variables, in local fil - `PORT` - which port to run the service on (default: `3555`) - `NAMESPACE` - URI namespace of all objects served via this proxy. Must end with a slash (default: `http://example.org/`) +- `BASE` - Path under which the application will be hosted on. Must end with a slash. (Default: `/`) + - If `NAMESPACE` is `http://example.org/some-path/`, but `http://example.org/` itself is not served by jskos-proxy, you need to set `BASE` to `/some-path/`. - `BACKEND` - JSKOS API base URL - `TITLE` - Title of the service (default `JSKOS Proxy`) diff --git a/config/config.js b/config/config.js index bfb6dcb..993318f 100644 --- a/config/config.js +++ b/config/config.js @@ -45,6 +45,7 @@ const config = { env: NODE_ENV, configDir, isProduction: NODE_ENV === "production", + base: env.BASE || "/", namespace: new URL(env.NAMESPACE || "http://example.org/"), port: env.PORT || 3555, backend: env.BACKEND || "test/items.ndjson", diff --git a/src/client/components/TheHeader.vue b/src/client/components/TheHeader.vue index ad16e52..474cf05 100644 --- a/src/client/components/TheHeader.vue +++ b/src/client/components/TheHeader.vue @@ -1,10 +1,10 @@