mirror of
https://github.com/Jackett/Jackett.git
synced 2025-09-17 17:34:09 +02:00
Couple of bugfixes
This commit is contained in:
@@ -34,11 +34,6 @@ namespace Jackett.Controllers
|
||||
var indexer = indexerService.GetIndexer(indexerName);
|
||||
var torznabQuery = TorznabQuery.FromHttpQuery(HttpUtility.ParseQueryString(Request.RequestUri.Query));
|
||||
|
||||
if (!string.Equals(torznabQuery.ApiKey, serverService.Config.APIKey, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.Forbidden, "Incorrect API key");
|
||||
}
|
||||
|
||||
if (string.Equals(torznabQuery.QueryType, "caps", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return new HttpResponseMessage()
|
||||
@@ -47,6 +42,11 @@ namespace Jackett.Controllers
|
||||
};
|
||||
}
|
||||
|
||||
if (!string.Equals(torznabQuery.ApiKey, serverService.Config.APIKey, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
return Request.CreateResponse(HttpStatusCode.Forbidden, "Incorrect API key");
|
||||
}
|
||||
|
||||
var releases = await indexer.PerformQuery(torznabQuery);
|
||||
|
||||
logger.Info(string.Format("Found {0} releases from {1}", releases.Length, indexer.DisplayName));
|
||||
|
@@ -115,7 +115,7 @@ namespace Jackett.Services
|
||||
public void Start()
|
||||
{
|
||||
// Start the server
|
||||
logger.Debug("Starting web server at " + config.GetListenAddresses()[0]);
|
||||
logger.Info("Starting web server at " + config.GetListenAddresses()[0]);
|
||||
var startOptions = new StartOptions();
|
||||
config.GetListenAddresses().ToList().ForEach(u => startOptions.Urls.Add(u));
|
||||
_server = WebApp.Start<Startup>(startOptions);
|
||||
|
Reference in New Issue
Block a user