mirror of
https://github.com/gtsteffaniak/filebrowser.git
synced 2026-11-26 00:19:41 -05:00
chore: set public path on the fly
This commit is contained in:
1 parent
8a47aee137
commit
4711e7bcd5
2 files changed
+5
-5
No files matched your search
@@ -5,6 +5,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// eslint-disable-next-line no-undef
|
||||
__webpack_public_path__ = window.FileBrowser.StaticURL + "/";
|
||||
|
||||
export default {
|
||||
name: "app",
|
||||
mounted() {
|
||||
|
||||
+2
-5
@@ -126,12 +126,9 @@ func getStaticHandlers(store *storage.Storage, server *settings.Server, assetsFs
|
||||
}
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(r.URL.Path, ".js") {
|
||||
http.FileServer(http.FS(assetsFs)).ServeHTTP(w, r)
|
||||
return 0, nil
|
||||
}
|
||||
http.FileServer(http.FS(assetsFs)).ServeHTTP(w, r)
|
||||
|
||||
return handleWithStaticData(w, r, d, assetsFs, r.URL.Path, "application/javascript; charset=utf-8")
|
||||
return 0, nil
|
||||
}, "/static/", store, server)
|
||||
|
||||
return index, static
|
||||
|
||||
Reference in new issue
Block a user