Merge pull request #6 from navi-infra/ch11577
[ch11577] | Abhishek | Make backend URL an environment variable
This commit is contained in:
@@ -4,4 +4,5 @@ window.config = {
|
||||
CLIENT_ID: '0oaa0a9up1F7lQc5A4x6',
|
||||
SCOPE: 'openid groups',
|
||||
RESPONSE_TYPE: 'id_token',
|
||||
BACKEND_URL: 'https://deployment-portal-backend.np.navi-tech.in'
|
||||
}
|
||||
|
||||
@@ -10,4 +10,5 @@ services:
|
||||
- REDIRECT_URI=http://localhost:3000/implicit/callback
|
||||
- CLIENT_ID=0oaa0a9up1F7lQc5A4x6
|
||||
- SCOPE=openid groups
|
||||
- RESPONSE_TYPE=id_token
|
||||
- RESPONSE_TYPE=id_token
|
||||
- BACKEND_URL=https://deployment-portal-backend.np.navi-tech.in
|
||||
1
src/AppConfig.d.ts
vendored
1
src/AppConfig.d.ts
vendored
@@ -1,5 +1,6 @@
|
||||
export interface AppConfig {
|
||||
ISSUER: string,
|
||||
BACKEND_URL: string,
|
||||
REDIRECT_URI: string,
|
||||
RESPONSE_TYPE: string,
|
||||
SCOPE: string,
|
||||
|
||||
@@ -50,8 +50,7 @@ const Form = () => {
|
||||
const handleSubmit = async (values: any ): Promise<void> => {
|
||||
|
||||
console.log(values);
|
||||
|
||||
fetch('http://localhost:9090/manifest', {
|
||||
fetch(`${window.config.BACKEND_URL}/manifest`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
|
||||
@@ -52,7 +52,7 @@ const ShowDeploymentManifest = () => {
|
||||
console.log("...." + serviceName + environment);
|
||||
const {idToken} = authState;
|
||||
fetch(
|
||||
`http://localhost:9090/manifest/${serviceName}/${environment}`,
|
||||
`${window.config.BACKEND_URL}/manifest/${serviceName}/${environment}`,
|
||||
{
|
||||
method: 'GET',
|
||||
headers: {
|
||||
|
||||
Reference in New Issue
Block a user