mirror of https://github.com/abpframework/abp.git
2 changed files with 16 additions and 3 deletions
@ -1,13 +1,22 @@ |
|||||
using Microsoft.AspNetCore.Mvc; |
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.Extensions.Options; |
||||
using Volo.Abp.AspNetCore.Mvc; |
using Volo.Abp.AspNetCore.Mvc; |
||||
|
using Volo.Blogging; |
||||
|
|
||||
namespace Volo.BloggingTestApp.Controllers |
namespace Volo.BloggingTestApp.Controllers |
||||
{ |
{ |
||||
public class HomeController : AbpController |
public class HomeController : AbpController |
||||
{ |
{ |
||||
|
private readonly BloggingUrlOptions _blogOptions; |
||||
|
|
||||
|
public HomeController(IOptions<BloggingUrlOptions> blogOptions) |
||||
|
{ |
||||
|
_blogOptions = blogOptions.Value; |
||||
|
} |
||||
public ActionResult Index() |
public ActionResult Index() |
||||
{ |
{ |
||||
return Redirect("/blog/"); |
var urlPrefix = _blogOptions.RoutePrefix; |
||||
|
return Redirect(urlPrefix); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue