We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ee14f9 + 841a4c7 commit 14bb03cCopy full SHA for 14bb03c
lib/cortex/snippets/client.rb
@@ -29,8 +29,8 @@ def current_webpage(request)
29
def request_url(request)
30
# TODO: Should be grabbing request URL in a framework-agnostic manner, but this is fine for now
31
uri = Addressable::URI.parse(request.original_url)
32
-
33
- "#{uri.scheme}://#{uri.authority}#{uri.path}"
+ path = uri.path == "/" ? uri.path : uri.path.chomp("/")
+ "#{uri.scheme}://#{uri.authority}#{path}"
34
end
35
36
0 commit comments