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] [HttpGet]
[AllowAnonymous] [AllowAnonymous]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)] [ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)]
[IgnoreAntiforgeryToken]
public IActionResult Favicon([FromServices] IWebHostEnvironment env) public IActionResult Favicon([FromServices] IWebHostEnvironment env)
{ {
string imageFile = FileHelper.MapPath(env, Constants.FAVICON_PATH); string imageFile = FileHelper.MapPath(env, Constants.FAVICON_PATH);

View File

@ -20,6 +20,7 @@ namespace Teknik.Areas.Error.Controllers
{ {
[Authorize] [Authorize]
[Area("Error")] [Area("Error")]
[ResponseCache(Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorController : DefaultController, IErrorController public class ErrorController : DefaultController, IErrorController
{ {
public ErrorController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } 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] [HttpGet]
[AllowAnonymous] [AllowAnonymous]
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any, NoStore = false)] [ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any, NoStore = false)]
[IgnoreAntiforgeryToken]
[TrackDownload] [TrackDownload]
public IActionResult Download(int episode, string fileName) public IActionResult Download(int episode, string fileName)
{ {

View File

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

View File

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

View File

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