1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Bug FIxes

This commit is contained in:
Uncled1023 2022-05-30 14:09:19 -07:00
parent 88fb168044
commit 22020404b9
6 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,7 @@ namespace Teknik.IdentityServer.Controllers
[HttpGet]
[AllowAnonymous]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)]
[IgnoreAntiforgeryToken]
public IActionResult Favicon([FromServices] IWebHostEnvironment env)
{
string imageFile = FileHelper.MapPath(env, Constants.FAVICON_PATH);

View File

@ -20,6 +20,7 @@ namespace Teknik.Areas.Error.Controllers
{
[Authorize]
[Area("Error")]
[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorController : DefaultController, IErrorController
{
public ErrorController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { }

View File

@ -84,6 +84,7 @@ namespace Teknik.Areas.Podcast.Controllers
[HttpGet]
[AllowAnonymous]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any, NoStore = false)]
[IgnoreAntiforgeryToken]
[TrackDownload]
public IActionResult Download(int episode, string fileName)
{

View File

@ -214,6 +214,8 @@ namespace Teknik.Areas.Upload.Controllers
[HttpGet]
[AllowAnonymous]
[TrackPageView]
[TrackDownload]
[IgnoreAntiforgeryToken]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)]
public async Task<IActionResult> Download(string file)
{
@ -412,6 +414,7 @@ namespace Teknik.Areas.Upload.Controllers
[HttpPost]
[AllowAnonymous]
[TrackDownload]
public IActionResult DownloadData(string file, bool decrypt)
{
if (_config.UploadConfig.DownloadEnabled)

View File

@ -30,7 +30,6 @@ namespace Teknik.Areas.Users.Controllers
{
[Authorize]
[Area("User")]
[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
public class UserController : DefaultController
{
private static readonly UsedCodesManager usedCodesManager = new UsedCodesManager();

View File

@ -19,7 +19,6 @@ namespace Teknik.Controllers
{
[Area("Default")]
[CORSActionFilter]
[ResponseCache(Duration = 3600, Location = ResponseCacheLocation.Any)]
public class DefaultController : Controller
{
protected string Subdomain
@ -45,6 +44,7 @@ namespace Teknik.Controllers
[HttpGet]
[AllowAnonymous]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)]
[IgnoreAntiforgeryToken]
public IActionResult Favicon([FromServices] IWebHostEnvironment env)
{
string imageFile = FileHelper.MapPath(env, Constants.FAVICON_PATH);
@ -56,6 +56,7 @@ namespace Teknik.Controllers
[HttpGet]
[AllowAnonymous]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)]
[IgnoreAntiforgeryToken]
public IActionResult Logo([FromServices] IWebHostEnvironment env)
{
string imageFile = FileHelper.MapPath(env, Constants.LOGO_PATH);