Skip to content
This repository was archived by the owner on Oct 15, 2023. It is now read-only.

Commit a855b2d

Browse files
authored
v0.4.14: LatestRelease <- Development (#45)
2 parents 2e6de61 + 1f72a33 commit a855b2d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,18 @@ func launchApp() {
8989
switch runtime.GOOS {
9090
case "windows":
9191
initHTTPHandlers()
92-
launcher.StartFrontendAndBackendWindows(frontendPath, chromeLauncher)
92+
launcher.StartOnWindows(frontendPath, chromeLauncher)
9393
return
9494
case "darwin": // "mac"
9595
panic("Darwin Not Supported Yet")
9696
return
9797
case "linux": // "linux"
9898
initHTTPHandlers()
99-
launcher.StartFrontendAndBackendLinux(frontendPath, chromiumLauncher)
99+
launcher.StartOnLinux(frontendPath, chromiumLauncher)
100100
return
101101
default: // "freebsd", "openbsd", "netbsd"
102102
initHTTPHandlers()
103-
launcher.StartFrontendAndBackendLinux(frontendPath, chromiumLauncher)
103+
launcher.StartOnLinux(frontendPath, chromiumLauncher)
104104
return
105105
}
106106
}

fileserver/fileserver.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func ServeFileServer(response http.ResponseWriter, request *http.Request) {
4848
fileServerSystem := http.FileServer(fileSystem)
4949

5050
response = setHeaders(response, request)
51+
5152
if !strings.Contains(request.Header.Get("Accept-Encoding"), "gzip") {
5253
fileServerSystem.ServeHTTP(response, request)
5354
} else {
@@ -64,6 +65,11 @@ func setHeaders(response http.ResponseWriter, request *http.Request) http.Respon
6465

6566
// response.Header().Add("Cache-Control", "max-age=31536000, immutable")
6667

68+
// Check if the requested file has a ".css" extension
69+
if strings.HasSuffix(request.URL.Path, ".css") {
70+
response.Header().Set("Content-Type", "text/css")
71+
}
72+
6773
response.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate")
6874
response.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
6975
return response

0 commit comments

Comments
 (0)