File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,16 @@ func DataLocationHandler(c *gin.Context) {
34
34
return
35
35
}
36
36
37
+ // by default use DataLocationAttributes as list of meta-data record attributes to lookup
38
+ // but if HTTP request provide concrete attribute switch to it
39
+ locationAttributes := srvConfig .Config .CHESSMetaData .DataLocationAttributes
40
+ attr := c .Query ("attr" )
41
+ if attr != "" {
42
+ locationAttributes = append (locationAttributes , attr )
43
+ }
44
+
37
45
// Extract data location from metadata record
38
- for _ , attr := range srvConfig . Config . CHESSMetaData . DataLocationAttributes {
46
+ for _ , attr := range locationAttributes {
39
47
if val , ok := meta [attr ]; ok {
40
48
// if location attribute (raw data location) is found redirect to it
41
49
path := val .(string )
You can’t perform that action at this time.
0 commit comments