fix app redirect to app instead of root url

This commit is contained in:
Kukks 2019-01-15 09:46:07 +01:00
parent 43295c9c57
commit e119dc823f

View file

@ -19,6 +19,7 @@ using BTCPayServer.Services.Rates;
using Ganss.XSS;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@ -183,7 +184,7 @@ namespace BTCPayServer.Controllers
NotificationURL = settings.NotificationUrl,
FullNotifications = true,
ExtendedNotifications = true,
RedirectURL = request.RedirectUrl,
RedirectURL = request.RedirectUrl ?? Request.GetDisplayUrl(),
}, store, HttpContext.Request.GetAbsoluteRoot());
@ -255,6 +256,7 @@ namespace BTCPayServer.Controllers
OrderId = orderId,
NotificationURL = notificationUrl,
RedirectURL = redirectUrl,
// RedirectURL = redirectUrl ?? Request.GetDisplayUrl(),
FullNotifications = true,
}, store, HttpContext.Request.GetAbsoluteRoot());
return RedirectToAction(nameof(InvoiceController.Checkout), "Invoice", new { invoiceId = invoice.Data.Id });