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 2e229080..7332ef6b 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 74900090..01f39cb7 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 721ac01b..f39b884e 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 906ff623..43c6b0f3 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;