AutoImport - check local url fix
This commit is contained in:
@@ -132,7 +132,7 @@ namespace WebAPI.Controllers
|
|||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public IActionResult AutoImport(string apiKey)
|
public IActionResult AutoImport(string apiKey)
|
||||||
{
|
{
|
||||||
if (Request.Host.Value != "localhost:5400" || apiKey != configuration["apiKey"])
|
if (Request.Host.Value != configuration["api-local-url"] || apiKey != configuration["apiKey"])
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
}
|
}
|
||||||
@@ -180,7 +180,7 @@ namespace WebAPI.Controllers
|
|||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public IActionResult autoImportMorska(string apiKey)
|
public IActionResult autoImportMorska(string apiKey)
|
||||||
{
|
{
|
||||||
if (Request.Host.Value != "localhost:5401" || apiKey != configuration["apiKey"])
|
if (Request.Host.Value != configuration["api-local-url"] || apiKey != configuration["apiKey"])
|
||||||
{
|
{
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"apiKey": "10763478CB738D4ecb2h76g803478CB738D4e",
|
"apiKey": "10763478CB738D4ecb2h76g803478CB738D4e",
|
||||||
"exportDirectory": "1eTyCUzYbzVQB8f8sbNmvnebFXyW2-axt",
|
"exportDirectory": "1eTyCUzYbzVQB8f8sbNmvnebFXyW2-axt",
|
||||||
"appLogsFile": "1RL-qtl0THgBUWcEWWqc0nCaVY7c8RRfXk6uhsqczuVA",
|
"appLogsFile": "1RL-qtl0THgBUWcEWWqc0nCaVY7c8RRfXk6uhsqczuVA",
|
||||||
|
"apiLocalUrl": "localhost:5401",
|
||||||
"Kestrel": {
|
"Kestrel": {
|
||||||
"Endpoints": {
|
"Endpoints": {
|
||||||
"Http": {
|
"Http": {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"apiKey": "#{api-key}#",
|
"apiKey": "#{api-key}#",
|
||||||
"exportDirectory": "#{export-directory}#",
|
"exportDirectory": "#{export-directory}#",
|
||||||
"appLogsFile": "#{app-logs-file}#",
|
"appLogsFile": "#{app-logs-file}#",
|
||||||
|
"apiLocalUrl": "#{api-local-url}#",
|
||||||
"Kestrel": {
|
"Kestrel": {
|
||||||
"Endpoints": {
|
"Endpoints": {
|
||||||
"Http": {
|
"Http": {
|
||||||
|
|||||||
Reference in New Issue
Block a user