mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Update kernel HTTP User-Agent
This commit is contained in:
parent
b955f3c653
commit
85ad37af0a
2 changed files with 4 additions and 2 deletions
|
@ -24,6 +24,7 @@ import (
|
|||
"mime"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
@ -88,7 +89,7 @@ func Boot() {
|
|||
msStoreFilePath := filepath.Join(WorkingDir, "ms-store")
|
||||
ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath)
|
||||
|
||||
UserAgent = UserAgent + " " + Container
|
||||
UserAgent = UserAgent + " " + Container + "/" + runtime.GOOS
|
||||
httpclient.SetUserAgent(UserAgent)
|
||||
|
||||
initWorkspaceDir(*workspacePath)
|
||||
|
|
|
@ -20,6 +20,7 @@ import (
|
|||
"math/rand"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
|
@ -35,7 +36,7 @@ func BootMobile(container, appDir, workspaceBaseDir, lang string) {
|
|||
initHttpClient()
|
||||
ServerPort = FixedPort
|
||||
Container = container
|
||||
UserAgent = UserAgent + " " + Container
|
||||
UserAgent = UserAgent + " " + Container + "/" + runtime.GOOS
|
||||
httpclient.SetUserAgent(UserAgent)
|
||||
Lang = lang
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue