Skip to content

Commit

Permalink
Merge pull request DSpace#2452 from tdonohue/fix_demo_urls
Browse files Browse the repository at this point in the history
Replace mentions of demo7.dspace.org and api7.dspace.org with new demo URLs
  • Loading branch information
hardyoyo authored Aug 22, 2023
2 parents 77e994d + b51fd46 commit e47586f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ DSPACE_UI_SSL => DSPACE_SSL

The same settings can also be overwritten by setting system environment variables instead, E.g.:
```bash
export DSPACE_HOST=api7.dspace.org
export DSPACE_UI_PORT=4200
export DSPACE_HOST=demo.dspace.org
export DSPACE_UI_PORT=4000
```

The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides external config set by `DSPACE_APP_CONFIG_PATH` overrides **`config.(prod or dev).yml`**
Expand Down Expand Up @@ -288,7 +288,7 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con
The test files can be found in the `./cypress/integration/` folder.

Before you can run e2e tests, two things are REQUIRED:
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time.
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time.
* After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend.
* If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example:
```
Expand Down
2 changes: 1 addition & 1 deletion config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ui:
# 'synced' with the 'dspace.server.url' setting in your backend's local.cfg.
rest:
ssl: true
host: api7.dspace.org
host: sandbox.dspace.org
port: 443
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /server
Expand Down
2 changes: 1 addition & 1 deletion config/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rest:
ssl: true
host: api7.dspace.org
host: sandbox.dspace.org
port: 443
nameSpace: /server
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ and the backend at http://localhost:8080/server/

## Run DSpace Angular dist build with DSpace Demo site backend

This allows you to run the Angular UI in *production* mode, pointing it at the demo backend
(https://api7.dspace.org/server/).
This allows you to run the Angular UI in *production* mode, pointing it at the demo or sandbox backend
(https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/).

```
docker-compose -f docker/docker-compose-dist.yml pull
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
# This is because Server Side Rendering (SSR) currently requires a public URL,
# see this bug: https://github.com/DSpace/dspace-angular/issues/1485
DSPACE_REST_SSL: 'true'
DSPACE_REST_HOST: api7.dspace.org
DSPACE_REST_HOST: sandbox.dspace.org
DSPACE_REST_PORT: 443
DSPACE_REST_NAMESPACE: /server
image: dspace/dspace-angular:${DSPACE_VER:-latest}-dist
Expand Down
4 changes: 2 additions & 2 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dspace-angular connects to your DSpace installation by using its REST endpoint.
```yaml
rest:
ssl: true
host: api7.dspace.org
host: demo.dspace.org
port: 443
nameSpace: /server
}
Expand All @@ -57,7 +57,7 @@ rest:
Alternately you can set the following environment variables. If any of these are set, it will override all configuration files:
```
DSPACE_REST_SSL=true
DSPACE_REST_HOST=api7.dspace.org
DSPACE_REST_HOST=demo.dspace.org
DSPACE_REST_PORT=443
DSPACE_REST_NAMESPACE=/server
```
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/browser-hard-redirect.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export class BrowserHardRedirectService extends HardRedirectService {
/**
* Get the origin of the current URL
* i.e. <scheme> "://" <hostname> [ ":" <port> ]
* e.g. if the URL is https://demo7.dspace.org/search?query=test,
* the origin would be https://demo7.dspace.org
* e.g. if the URL is https://demo.dspace.org/search?query=test,
* the origin would be https://demo.dspace.org
*/
getCurrentOrigin(): string {
return this.location.origin;
Expand Down
4 changes: 2 additions & 2 deletions src/app/core/services/hard-redirect.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export abstract class HardRedirectService {
/**
* Get the origin of the current URL
* i.e. <scheme> "://" <hostname> [ ":" <port> ]
* e.g. if the URL is https://demo7.dspace.org/search?query=test,
* the origin would be https://demo7.dspace.org
* e.g. if the URL is https://demo.dspace.org/search?query=test,
* the origin would be https://demo.dspace.org
*/
abstract getCurrentOrigin(): string;
}
4 changes: 2 additions & 2 deletions src/app/core/services/server-hard-redirect.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export class ServerHardRedirectService extends HardRedirectService {
/**
* Get the origin of the current URL
* i.e. <scheme> "://" <hostname> [ ":" <port> ]
* e.g. if the URL is https://demo7.dspace.org/search?query=test,
* the origin would be https://demo7.dspace.org
* e.g. if the URL is https://demo.dspace.org/search?query=test,
* the origin would be https://demo.dspace.org
*/
getCurrentOrigin(): string {
return this.req.protocol + '://' + this.req.headers.host;
Expand Down

0 comments on commit e47586f

Please sign in to comment.