Skip to content

Fix generate cleanUrl in post-auth.js with hostname #390

@devromarus

Description

@devromarus

Description

Function postAuth can't redirect to full cleanUrl.

Because we have an app name after the hostname and current version redirect with error.

Our url:
http://host-name/app-name/path

Redirect url in current version:
http://host-name/path

Add generation for redirect as in protect.js

const host = request.hostname
const headerHost = request.headers.host.split(':')
const port = headerHost[1] || ''
const protocol = request.protocol

const redirectUrl = protocol + '://' + host + (port === '' ? '' : ':' + port) + cleanUrl

Discussion

No response

Motivation

No response

Details

#391

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions