File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
src/openeo_grass_gis_driver Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 205
205
206
206
207
207
def replace_links_in_capabilities ():
208
- host_url = request .host_url .rstrip ('/' )
209
- split_url = host_url .split ('/' )
210
- if host_url .startswith ('http' ):
211
- new_url = "%s//%s" % (split_url [0 ], split_url [2 ])
212
- else :
213
- new_url = split_url [0 ]
208
+ new_url = request .root_url .rstrip ('/' )
214
209
215
210
for i in CAPABILITIES ['links' ]:
216
211
sample_url = i ['href' ]
@@ -226,7 +221,7 @@ def replace_links_in_capabilities():
226
221
class Capabilities (Resource ):
227
222
228
223
def get (self , ):
229
- # links need to be replaced here because host_url
224
+ # links need to be replaced here because root_url
230
225
# is only available during a request
231
226
CAPABILITIES = replace_links_in_capabilities ()
232
227
return make_response (jsonify (CAPABILITIES ), 200 )
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def __init__(self):
22
22
23
23
def get (self ):
24
24
25
- url = '%s%s/' % (request .host_url .strip ('/' ), URL_PREFIX )
25
+ url = '%s%s/' % (request .root_url .strip ('/' ), URL_PREFIX )
26
26
27
27
version_list = list ()
28
28
version_list .append ({"url" : url ,
You can’t perform that action at this time.
0 commit comments