From c3c23910802f9f3eacb32941d8cabebecff2f32f Mon Sep 17 00:00:00 2001 From: sasbot <> Date: Sat, 6 Jun 2020 12:00:00 +0000 Subject: [PATCH] update zmp --- _water/navionics.SonarChart.layer.zmp/GetUrlScript.txt | 5 +++-- _water/navionics.SonarChart.zmp/GetUrlScript.txt | 5 +++-- _water/navionics.layer.zmp/GetUrlScript.txt | 5 +++-- _water/navionics.zmp/GetUrlScript.txt | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt b/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt index 2e229080d..7332ef6b2 100644 --- a/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt +++ b/_water/navionics.SonarChart.layer.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData; diff --git a/_water/navionics.SonarChart.zmp/GetUrlScript.txt b/_water/navionics.SonarChart.zmp/GetUrlScript.txt index 74900090f..01f39cb70 100644 --- a/_water/navionics.SonarChart.zmp/GetUrlScript.txt +++ b/_water/navionics.SonarChart.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData; diff --git a/_water/navionics.layer.zmp/GetUrlScript.txt b/_water/navionics.layer.zmp/GetUrlScript.txt index 721ac01bf..f39b884ef 100644 --- a/_water/navionics.layer.zmp/GetUrlScript.txt +++ b/_water/navionics.layer.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData; diff --git a/_water/navionics.zmp/GetUrlScript.txt b/_water/navionics.zmp/GetUrlScript.txt index 906ff6237..43c6b0f33 100644 --- a/_water/navionics.zmp/GetUrlScript.txt +++ b/_water/navionics.zmp/GetUrlScript.txt @@ -34,7 +34,7 @@ var VTimeStamp: AnsiString; VResponseCode: Cardinal; VResponseHeader, VResponseData: AnsiString; - VRequestUrl: AnsiString; + VRequestUrl, VRequestHeader: AnsiString; begin Result := ''; @@ -51,9 +51,10 @@ begin if (Result = '') and Assigned(Downloader) then begin VTimeStamp := IntToStr(GetUnixTime); VRequestUrl := 'https://backend.navionics.io/tile/get_key/Navionics_internalpurpose_00001/webapiv2.navionics.com?_=' + VTimeStamp; + VRequestHeader := 'Origin: https://webapiv2.navionics.com' + #13#10 + 'Referer: https://webapiv2.navionics.com/examples/4000_gNavionicsOverlayExample.html'; VResponseHeader := ''; VResponseData := ''; - VResponseCode := Downloader.DoHttpRequest(VRequestUrl, '', '', VResponseHeader, VResponseData); + VResponseCode := Downloader.DoHttpRequest(VRequestUrl, VRequestHeader, '', VResponseHeader, VResponseData); if VResponseCode = 200 then begin Result := VResponseData;