fix: small bugfixes based on my experience migrating my site
This commit is contained in:
parent
658a4016fb
commit
2c7aea4654
@ -52,9 +52,13 @@ var (
|
||||
Action: func(ctx *cli.Context) error {
|
||||
log := zaputil.Extract(ctx.Context)
|
||||
|
||||
// additional mime-types that need to be explicitly registered
|
||||
_ = mime.AddExtensionType(".woff2", "application/font-woff2")
|
||||
_ = mime.AddExtensionType(".woff", "application/font-woff")
|
||||
_ = mime.AddExtensionType(".ttf", "font/ttf")
|
||||
_ = mime.AddExtensionType(".yaml", "application/yaml")
|
||||
_ = mime.AddExtensionType(".yml", "application/yaml")
|
||||
_ = mime.AddExtensionType(".json", "application/json")
|
||||
|
||||
gitService := git.NewService(hostConfig.Git)
|
||||
err := gitService.Load(ctx.Context)
|
||||
|
@ -18,11 +18,13 @@
|
||||
|
||||
import {ulid} from 'ulid';
|
||||
|
||||
const secure = window.location.protocol === "https:";
|
||||
const protocol = secure ? "wss:" : "ws:";
|
||||
const sessionPrefix = "/_session";
|
||||
const domain = window.location.host;
|
||||
const domain = window.location.host + (secure ? ":443" : "");
|
||||
|
||||
async function main() {
|
||||
const ws = new WebSocket(`ws://${domain}${sessionPrefix}${window.location.pathname}`);
|
||||
const ws = new WebSocket(`${protocol}//${domain}${sessionPrefix}${window.location.pathname}`);
|
||||
const message = `{"ID":"${ulid()}","FullName":"ping"}`
|
||||
|
||||
let id = null;
|
||||
|
Loading…
Reference in New Issue
Block a user