OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Installation/Technical Issues or Problems Redirect to absolute url with protocol

This topic contains 3 replies, has 3 voices, and was last updated by  balmerhevi 7 years, 5 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34711

    lrotherfield
    Participant

    We have been struggling to redirect to an absolute URL because isFullRedirect in Oro\Bundle\NavigationBundle\Event\ResponseHashnavListener is only set if the current security token is not an object or a 404/500 response is returned. Am I missing something that I need to add to a redirect response if I actually want to navigate away from the site? Checking for scheme existence in the location header and setting isFullRedirect is working for me for the time being.

    I came across this because I need to redirect to twitter to authenticate my application for the current user if they have not already authenticated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #34712

    bogdan
    Participant

    Hi,

    Thanks for notifying us about the issue, it will be fixed in the next release. To make a hotfix, you can modify vendor/oro/navigation-bundle/Oro/Bundle/NavigationBundle/Resources/public/js/hash.navigation.js and replace checkThirdPartyLink function with the next code`checkThirdPartyLink: function(url) {
    var external = RegExp(‘^(https?:)?//(?!’ + location.host + ‘)’);
    return (url.indexOf(‘http’) !== -1) && external.test(url);
    }`

    #34713

    lrotherfield
    Participant

    Brilliant, thanks for the hotfix!

    #34714

    balmerhevi
    Participant

    Check this one, more about…URL Redirection

    Balmer

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroPlatform – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top