Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#8465 Improving API and preventing issues from geostore #8666

Merged
merged 2 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions build/devServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,41 @@ const protocol = process.env.MAPSTORE_BACKEND_PROTOCOL || "http";
const host = process.env.MAPSTORE_BACKEND_HOST || "localhost";
const MAPSTORE_BACKEND_BASE_URL = process.env.MAPSTORE_BACKEND_BASE_URL || (protocol + "://" + host + ":" + port);
const MAPSTORE_BACKEND_BASE_PATH = process.env.MAPSTORE_BACKEND_BASE_PATH || "/mapstore";
var matches = MAPSTORE_BACKEND_BASE_URL.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
const MAPSTORE_BACKEND_URL = process.env.MAPSTORE_BACKEND_URL || MAPSTORE_BACKEND_BASE_URL + MAPSTORE_BACKEND_BASE_PATH;
var matches = MAPSTORE_BACKEND_URL.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
var domain = matches && matches[1];
// configuration for local dev server. This is used by webpack-dev-server
// to proxy requests to the backend.
const devServer = {
proxy: {
'/rest': {
target: `${MAPSTORE_BACKEND_BASE_URL}${MAPSTORE_BACKEND_BASE_PATH}`,
target: MAPSTORE_BACKEND_URL,
secure: false,
logLevel: "debug"
},
'/pdf': {
target: `${MAPSTORE_BACKEND_BASE_URL}${MAPSTORE_BACKEND_BASE_PATH}`,
target: MAPSTORE_BACKEND_URL,
secure: false,
headers: {
host: domain
}
},
'/proxy': {
target: `${MAPSTORE_BACKEND_BASE_URL}${MAPSTORE_BACKEND_BASE_PATH}`,
target: MAPSTORE_BACKEND_URL,
secure: false,
headers: {
host: domain
}
},
'/extensions.json': {
target: `${MAPSTORE_BACKEND_BASE_URL}${MAPSTORE_BACKEND_BASE_PATH}`,
target: MAPSTORE_BACKEND_URL,
secure: false,
headers: {
host: domain
}
},
'/dist/extensions': {
target: `${MAPSTORE_BACKEND_BASE_URL}${MAPSTORE_BACKEND_BASE_PATH}`,
target: MAPSTORE_BACKEND_URL,
secure: false,
headers: {
host: domain
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ See the [dedicated section in this page](#backend) for more info
You can run only the front-end running `npm run fe:start`.
Running this script MapStore will run on port `8081` and will look for the back-end at port `8080`.

If you want to use an online instance of MapStore as backend, instead of the local one, you can define the environment variable `MAPSTORE_BACKEND_BASE_URL` to the desired URL.
If you want to use an online instance of MapStore as backend, instead of the local one, you can define the environment variable `MAPSTORE_BACKEND_URL` to the desired URL.

```sh
export MAPSTORE_BACKEND_BASE_URL=https://demo.geo-solutions.it/mapstore
export MAPSTORE_BACKEND_URL=https://dev-mapstore.geosolutionsgroup.com/mapstore
npm run fe:start # this command lunches only the front-end
```

Expand Down
3 changes: 3 additions & 0 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,9 @@
<properties>
<cargo.servlet.port>${tomcat.port}</cargo.servlet.port>
<cargo.logging>low</cargo.logging>
<cargo.jvmargs>
offtherailz marked this conversation as resolved.
Show resolved Hide resolved
-Djavax.xml.parsers.SAXParserFactory="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"
</cargo.jvmargs>
</properties>
</configuration>
<deployables>
Expand Down