Skip to content

Commit fdfab14

Browse files
committed
Use Rack::Request#base_url
1 parent 77a1218 commit fdfab14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/grape-swagger.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def self.setup(options)
7070
{
7171
apiVersion: api_version,
7272
swaggerVersion: "1.1",
73-
basePath: base_path || "#{env['rack.url_scheme']}://#{env['HTTP_HOST']}",
73+
basePath: base_path || request.base_url,
7474
operations:[],
7575
apis: routes_array
7676
}
@@ -102,7 +102,7 @@ def self.setup(options)
102102
{
103103
apiVersion: api_version,
104104
swaggerVersion: "1.1",
105-
basePath: base_path || "#{env['rack.url_scheme']}://#{env['HTTP_HOST']}",
105+
basePath: base_path || request.base_url,
106106
resourcePath: "",
107107
apis: routes_array
108108
}

0 commit comments

Comments
 (0)