Skip to content

Commit ff4a977

Browse files
authored
Merge pull request #2467 from CannonLock/web-client
Web client - Origin and Cache changes
2 parents 55892a0 + eea521f commit ff4a977

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

xrootd/resources/xrootd-cache.cfg

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,17 @@ http.trace {{.Logging.CacheHttp}}
9898
{{if .Xrootd.ConfigFile}}
9999
continue {{.Xrootd.ConfigFile}}
100100
{{end}}
101+
# Add in http headers to make the web client capable of requesting resources
102+
http.staticheader -verb=OPTIONS Access-Control-Allow-Origin *
103+
http.staticheader -verb=OPTIONS Access-Control-Allow-Methods GET,PUT,PROPFIND
104+
http.staticheader -verb=OPTIONS Access-Control-Allow-Headers Authorization,Want-Digest,Content-Type,User-Agent,Depth,Content-Length,Translate
105+
106+
http.staticheader -verb=GET Access-Control-Allow-Origin *
107+
http.staticheader -verb=GET Access-Control-Allow-Headers Authorization,Want-Digest,Content-Type,User-Agent
108+
http.staticheader -verb=GET Content-Disposition attachment
109+
110+
http.staticheader -verb=PUT Access-Control-Allow-Origin *
111+
http.staticheader -verb=PUT Access-Control-Allow-Headers Authorization
112+
113+
http.staticheader -verb=PROPFIND Access-Control-Allow-Origin *
114+
http.staticheader -verb=PROPFIND Access-Control-Allow-Headers Depth,Content-Type,Authorization,Content-Length,Translate

xrootd/resources/xrootd-origin.cfg

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,19 @@ scitokens.trace {{.Logging.OriginScitokens}}
139139
# Continue onto the next set of configuration
140140
continue {{.Xrootd.ConfigFile}}
141141
{{- end}}
142+
143+
# Add in http headers to make the web client capable of requesting resources
144+
# Add in http headers to make the web client capable of requesting resources
145+
http.staticheader -verb=OPTIONS Access-Control-Allow-Origin *
146+
http.staticheader -verb=OPTIONS Access-Control-Allow-Methods GET,PUT,PROPFIND
147+
http.staticheader -verb=OPTIONS Access-Control-Allow-Headers Authorization,Want-Digest,Content-Type,User-Agent,Depth,Content-Length,Translate
148+
149+
http.staticheader -verb=GET Access-Control-Allow-Origin *
150+
http.staticheader -verb=GET Access-Control-Allow-Headers Authorization,Want-Digest,Content-Type,User-Agent
151+
http.staticheader -verb=GET Content-Disposition attachment
152+
153+
http.staticheader -verb=PUT Access-Control-Allow-Origin *
154+
http.staticheader -verb=PUT Access-Control-Allow-Headers Authorization
155+
156+
http.staticheader -verb=PROPFIND Access-Control-Allow-Origin *
157+
http.staticheader -verb=PROPFIND Access-Control-Allow-Headers Depth,Content-Type,Authorization,Content-Length,Translate

0 commit comments

Comments
 (0)