Connection: "close" in HTTP headers in fetchWebServiceMap in MapComponent.js
This commit is contained in:
@@ -34,7 +34,12 @@ export const fetchGisStatusStations = async (idMap, idUser) => {
|
||||
// Verwende das Timeout für die API-Anfrage
|
||||
const response = await fetchWithTimeout(
|
||||
`${SERVER_URL}/talas5/ClientData/WebServiceMap.asmx/GisStationsStatusDistrict?idMap=${idMap}&idUser=${idUser}`,
|
||||
null,
|
||||
{
|
||||
method: "GET",
|
||||
headers: {
|
||||
Connection: "close", // Dieser Header stellt sicher, dass die Verbindung nach dem Abruf geschlossen wird
|
||||
},
|
||||
},
|
||||
5000 // Timeout auf 5 Sekunden gesetzt
|
||||
);
|
||||
|
||||
@@ -140,7 +145,7 @@ export const fetchUserRights = async () => {
|
||||
const response = await fetch(`${process.env.NEXT_PUBLIC_SERVER_URL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${config.idMap}&idUser=${config.idUser}`, {
|
||||
method: "GET",
|
||||
headers: {
|
||||
Connection: "keep-alive", // Keep-Alive Header hinzufügen
|
||||
Connection: "close",
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user