Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
56 changes: 56 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[[redirects]]
from = "/websocket"
to = "https://beta.curation.oncokb.org/websocket"
status = 200

[[redirects]]
from = "/api/*"
to = "https://beta.curation.oncokb.org/api/:splat"
status = 200

[[redirects]]
from = "/legacy-api/*"
to = "https://beta.curation.oncokb.org/legacy-api/:splat"
status = 200

[[redirects]]
from = "/services/*"
to = "https://beta.curation.oncokb.org/services/:splat"
status = 200

[[redirects]]
from = "/management/*"
to = "https://beta.curation.oncokb.org/management/:splat"
status = 200

[[redirects]]
from = "/v3/api-docs/*"
to = "https://beta.curation.oncokb.org/v3/api-docs/:splat"
status = 200

[[redirects]]
from = "/h2-console/*"
to = "https://beta.curation.oncokb.org/h2-console/:splat"
status = 200

[[redirects]]
from = "/oauth2/authorization/oidc"
to = "https://beta.curation.oncokb.org/oauth2/authorization/oidc"
status = 200
force = true

[[redirects]]
from = "/oauth2/authorization/oidc/*"
to = "https://beta.curation.oncokb.org/oauth2/authorization/oidc/:splat"
status = 200

[[redirects]]
from = "/login/oauth2/code/*"
to = "https://beta.curation.oncokb.org/login/oauth2/code/:splat"
status = 200


[[redirects]]
from = "/auth/*"
to = "https://beta.curation.oncokb.org/auth/:splat"
status = 200
4 changes: 2 additions & 2 deletions webpack/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ module.exports = async options => {
// If this URL is left empty (""), then it will be relative to the current context.
// If you use an API server, in `prod` mode, you will need to enable CORS
// (see the `jhipster.cors` common JHipster property in the `application-*.yml` configurations)
SERVER_API_URL: `''`,
SERVER_API_URL: `'${process.env.hasOwnProperty('NETLIFY_SERVER_API_URL') ? process.env.NETLIFY_SERVER_API_URL : ''}'`,
},
}),
new webpack.DefinePlugin({
Expand Down Expand Up @@ -141,7 +141,7 @@ module.exports = async options => {
base: '/',
}),
],
}
},
// jhipster-needle-add-webpack-config - JHipster will add custom config
);
};