You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2025/04/04 00:33:55 UTC

(airavata) branch cybershuttle-staging updated: configurable allowed origin for research service

This is an automated email from the ASF dual-hosted git repository.

lahirujayathilake pushed a commit to branch cybershuttle-staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/cybershuttle-staging by this push:
     new 8e4be3aa85 configurable allowed origin for research service
8e4be3aa85 is described below

commit 8e4be3aa85a6815036ec79e956e02ac7cb707c29
Author: lahiruj <la...@gmail.com>
AuthorDate: Thu Apr 3 20:33:47 2025 -0400

    configurable allowed origin for research service
---
 .../org/apache/airavata/research/service/config/WebMvcConfig.java | 8 +++-----
 .../research-service/src/main/resources/application.yml           | 2 ++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/config/WebMvcConfig.java b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/config/WebMvcConfig.java
index 8ec02e9c3d..2ce40e29af 100644
--- a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/config/WebMvcConfig.java
+++ b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/config/WebMvcConfig.java
@@ -17,8 +17,6 @@
  * under the License.
  *
  */
-
-
 package org.apache.airavata.research.service.config;
 
 import org.springframework.beans.factory.annotation.Value;
@@ -29,13 +27,13 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 @Configuration
 public class WebMvcConfig implements WebMvcConfigurer {
 
-//    @Value("${airavta.web.url}")
-//    private String webURL;
+    @Value("${airavata.research-portal.url}")
+    private String allowedOrigin;
 
     @Override
     public void addCorsMappings(CorsRegistry registry) {
         registry.addMapping("/**")
-                .allowedOrigins("http://localhost:5173")
+                .allowedOrigins(allowedOrigin)
                 .allowedMethods("GET", "POST", "OPTIONS", "PATCH", "DELETE", "PUT")
                 .allowedHeaders("*");
     }
diff --git a/modules/research-framework/research-service/src/main/resources/application.yml b/modules/research-framework/research-service/src/main/resources/application.yml
index 9b2b574596..2c80d31bfd 100644
--- a/modules/research-framework/research-service/src/main/resources/application.yml
+++ b/modules/research-framework/research-service/src/main/resources/application.yml
@@ -10,6 +10,8 @@ airavata:
   research-hub:
     url: https://hub.dev.cybershuttle.org
     dev-user: "ljayathilake3@gatech.edu"
+  research-portal:
+    url: http://localhost:5173
   user-profile:
     server:
       url: api.dev.cybershuttle.org