Skip to content

Commit cc63fde

Browse files
authored
fixed ows hostname for WCS GetCaps (#545)
1 parent e23d02e commit cc63fde

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

ows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ func serveWCS(ctx context.Context, params utils.WCSParams, conf *utils.Config, r
674674
}
675675

676676
tpl, _ := fileResolver.Lookup("templates/WCS_GetCapabilities.tpl")
677-
err := utils.ExecuteWriteTemplateFile(w, &conf, tpl)
677+
err := utils.ExecuteWriteTemplateFile(w, &newConf, tpl)
678678
if err != nil {
679679
metricsCollector.Info.HTTPStatus = 500
680680
http.Error(w, err.Error(), 500)

utils/config.go

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,25 +1203,27 @@ func (config *Config) Copy(r *http.Request) *Config {
12031203
continue
12041204
}
12051205
newConf.Layers[i] = Layer{
1206-
Name: layer.Name,
1207-
Title: layer.Title,
1208-
Abstract: layer.Abstract,
1209-
NameSpace: layer.NameSpace,
1210-
OWSHostname: layer.OWSHostname,
1211-
OWSProtocol: newConf.ServiceConfig.OWSProtocol,
1212-
Styles: layer.Styles,
1213-
AxesInfo: layer.AxesInfo,
1214-
StepDays: layer.StepDays,
1215-
StepHours: layer.StepHours,
1216-
StepMinutes: layer.StepMinutes,
1217-
StartISODate: layer.StartISODate,
1218-
EndISODate: layer.EndISODate,
1219-
TimeGen: layer.TimeGen,
1220-
Accum: layer.Accum,
1221-
DataSource: layer.DataSource,
1222-
RGBExpressions: layer.RGBExpressions,
1223-
TimestampToken: layer.TimestampToken,
1224-
Dates: layer.Dates,
1206+
Name: layer.Name,
1207+
Title: layer.Title,
1208+
Abstract: layer.Abstract,
1209+
NameSpace: layer.NameSpace,
1210+
OWSHostname: layer.OWSHostname,
1211+
OWSProtocol: newConf.ServiceConfig.OWSProtocol,
1212+
Styles: layer.Styles,
1213+
AxesInfo: layer.AxesInfo,
1214+
StepDays: layer.StepDays,
1215+
StepHours: layer.StepHours,
1216+
StepMinutes: layer.StepMinutes,
1217+
StartISODate: layer.StartISODate,
1218+
EndISODate: layer.EndISODate,
1219+
TimeGen: layer.TimeGen,
1220+
Accum: layer.Accum,
1221+
DataSource: layer.DataSource,
1222+
RGBExpressions: layer.RGBExpressions,
1223+
TimestampToken: layer.TimestampToken,
1224+
Dates: layer.Dates,
1225+
EffectiveStartDate: layer.EffectiveStartDate,
1226+
EffectiveEndDate: layer.EffectiveEndDate,
12251227
}
12261228
if !hasOWSHostname {
12271229
newConf.Layers[i].OWSHostname = r.Host

0 commit comments

Comments
 (0)