Browse Source

Bug FIxes

master
Teknikode 1 month ago
parent
commit
22020404b9
  1. 1
      IdentityServer/Controllers/DefaultController.cs
  2. 1
      Teknik/Areas/Error/Controllers/ErrorController.cs
  3. 1
      Teknik/Areas/Podcast/Controllers/PodcastController.cs
  4. 3
      Teknik/Areas/Upload/Controllers/UploadController.cs
  5. 1
      Teknik/Areas/User/Controllers/UserController.cs
  6. 3
      Teknik/Controllers/DefaultController.cs

1
IdentityServer/Controllers/DefaultController.cs

@ -31,6 +31,7 @@ namespace Teknik.IdentityServer.Controllers @@ -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);

1
Teknik/Areas/Error/Controllers/ErrorController.cs

@ -20,6 +20,7 @@ namespace Teknik.Areas.Error.Controllers @@ -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) { }

1
Teknik/Areas/Podcast/Controllers/PodcastController.cs

@ -84,6 +84,7 @@ namespace Teknik.Areas.Podcast.Controllers @@ -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)
{

3
Teknik/Areas/Upload/Controllers/UploadController.cs

@ -214,6 +214,8 @@ namespace Teknik.Areas.Upload.Controllers @@ -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 @@ -412,6 +414,7 @@ namespace Teknik.Areas.Upload.Controllers
[HttpPost]
[AllowAnonymous]
[TrackDownload]
public IActionResult DownloadData(string file, bool decrypt)
{
if (_config.UploadConfig.DownloadEnabled)

1
Teknik/Areas/User/Controllers/UserController.cs

@ -30,7 +30,6 @@ namespace Teknik.Areas.Users.Controllers @@ -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();

3
Teknik/Controllers/DefaultController.cs

@ -19,7 +19,6 @@ namespace Teknik.Controllers @@ -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 @@ -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 @@ -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);

Loading…
Cancel
Save