mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01: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"
|
"mime"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
@ -88,7 +89,7 @@ func Boot() {
|
||||||
msStoreFilePath := filepath.Join(WorkingDir, "ms-store")
|
msStoreFilePath := filepath.Join(WorkingDir, "ms-store")
|
||||||
ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath)
|
ISMicrosoftStore = gulu.File.IsExist(msStoreFilePath)
|
||||||
|
|
||||||
UserAgent = UserAgent + " " + Container
|
UserAgent = UserAgent + " " + Container + "/" + runtime.GOOS
|
||||||
httpclient.SetUserAgent(UserAgent)
|
httpclient.SetUserAgent(UserAgent)
|
||||||
|
|
||||||
initWorkspaceDir(*workspacePath)
|
initWorkspaceDir(*workspacePath)
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
|
|
@ -35,7 +36,7 @@ func BootMobile(container, appDir, workspaceBaseDir, lang string) {
|
||||||
initHttpClient()
|
initHttpClient()
|
||||||
ServerPort = FixedPort
|
ServerPort = FixedPort
|
||||||
Container = container
|
Container = container
|
||||||
UserAgent = UserAgent + " " + Container
|
UserAgent = UserAgent + " " + Container + "/" + runtime.GOOS
|
||||||
httpclient.SetUserAgent(UserAgent)
|
httpclient.SetUserAgent(UserAgent)
|
||||||
Lang = lang
|
Lang = lang
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue