Skip to content

Commit

Permalink
Fix url regex to consider suffix added to app name in url
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsantos-sfdc committed Mar 26, 2024
1 parent 30536d8 commit e48c732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/authenticating_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def heroku_app
end
dev_app
else
match = request.host.match(/(.*)\.herokuapp\.com$/)
match = request.host.match(/(.*)\-.+\.herokuapp\.com$/)

unless match
raise 'Could not determine heroku app from host'
Expand All @@ -25,7 +25,7 @@ def authenticate_user!
if auth_header
token = auth_header.match(/Bearer (.*)$/)[1]
heroku_api = PlatformAPI.connect_oauth(token)
heroku_api.app.info("webhooks-demo-marcel-4")
heroku_api.app.info(heroku_app)
elsif session && session['token'] && session['email']
puts "cookies..xx #{cookies}"
session = cookies.encrypted[:_session_id]
Expand Down

0 comments on commit e48c732

Please sign in to comment.