Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/requests/sharing-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ class SharingRequest extends AuthRequest {
* @param req {IncomingRequest}
* @param res {ServerResponse}
*/
static async get (req, res) {
static async get (req, res, next) {
const request = SharingRequest.fromParams(req, res)

const appUrl = request.getAppUrl()
if (!appUrl) return next()
const appOrigin = appUrl.origin
const serverUrl = new url.URL(req.app.locals.ldp.serverUri)

Expand Down Expand Up @@ -153,6 +154,7 @@ class SharingRequest extends AuthRequest {
}

getAppUrl () {
if (!this.authQueryParams.redirect_uri) return
return new url.URL(this.authQueryParams.redirect_uri)
}

Expand Down