Compare commits
7 Commits
v2023.4.21
...
v2023.4.26
Author | SHA1 | Date | |
---|---|---|---|
6a976c0b51 | |||
d188af81af | |||
e975381b4f | |||
0d03a708f9 | |||
64ea0e05a9 | |||
10844a15a3 | |||
0394e34055 |
2
Makefile
2
Makefile
@ -158,7 +158,7 @@ full-version:
|
|||||||
|
|
||||||
update-edge-lib:
|
update-edge-lib:
|
||||||
git pull --rebase
|
git pull --rebase
|
||||||
GOPRIVATE=forge.cadoles.com/arcad/edge go get -u forge.cadoles.com/arcad/edge
|
GOPROXY=direct GOPRIVATE=forge.cadoles.com/arcad/edge go get -u forge.cadoles.com/arcad/edge
|
||||||
go mod tidy
|
go mod tidy
|
||||||
$(MAKE) test
|
$(MAKE) test
|
||||||
git add go.mod go.sum
|
git add go.mod go.sum
|
||||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module forge.cadoles.com/Cadoles/emissary
|
|||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
forge.cadoles.com/arcad/edge v0.0.0-20230421104009-f99b1ac6ac53
|
forge.cadoles.com/arcad/edge v0.0.0-20230426135323-17808d14c978
|
||||||
github.com/Masterminds/sprig/v3 v3.2.3
|
github.com/Masterminds/sprig/v3 v3.2.3
|
||||||
github.com/alecthomas/participle/v2 v2.0.0-beta.5
|
github.com/alecthomas/participle/v2 v2.0.0-beta.5
|
||||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
|
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
|
||||||
|
4
go.sum
4
go.sum
@ -54,8 +54,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
|
|||||||
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
|
||||||
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
|
||||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||||
forge.cadoles.com/arcad/edge v0.0.0-20230421104009-f99b1ac6ac53 h1:We5pGQf3py7t2+q0upZuSybjmp/SJW40nQZdeWmAyns=
|
forge.cadoles.com/arcad/edge v0.0.0-20230426135323-17808d14c978 h1:fekSRSb8gYcVx8C0B9K6B7+KiFHVixIwvPUkxcnRFp4=
|
||||||
forge.cadoles.com/arcad/edge v0.0.0-20230421104009-f99b1ac6ac53/go.mod h1:uv3wBa+UbcEUb7IiJCj1T96Xo3cmx1BwNxbBYRZhln8=
|
forge.cadoles.com/arcad/edge v0.0.0-20230426135323-17808d14c978/go.mod h1:uv3wBa+UbcEUb7IiJCj1T96Xo3cmx1BwNxbBYRZhln8=
|
||||||
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
|
gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8=
|
||||||
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg=
|
github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg=
|
||||||
github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k=
|
github.com/Azure/azure-pipeline-go v0.2.3/go.mod h1:x841ezTBIMG6O3lAcl8ATHnsOPVl2bqk7S3ta6S6u4k=
|
||||||
|
@ -44,6 +44,7 @@ func (s *Server) Start(ctx context.Context, addr string) (err error) {
|
|||||||
|
|
||||||
router := chi.NewRouter()
|
router := chi.NewRouter()
|
||||||
|
|
||||||
|
router.Use(middleware.RealIP)
|
||||||
router.Use(middleware.Logger)
|
router.Use(middleware.Logger)
|
||||||
router.Use(middleware.Compress(5))
|
router.Use(middleware.Compress(5))
|
||||||
|
|
||||||
@ -142,7 +143,7 @@ func getCookieDomain(r *http.Request) (string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If host is an IP address
|
// If host is an IP address
|
||||||
if wildcard.Match(host, "*.*.*.*") {
|
if ip := net.ParseIP(host); ip != nil {
|
||||||
return "", nil
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
"config": {
|
"config": {
|
||||||
"appUrlResolving": {
|
"appUrlResolving": {
|
||||||
"ifaceMappings": {
|
"ifaceMappings": {
|
||||||
"lo": "http://{{ .DeviceIP }}:{{ .AppPort }}",
|
|
||||||
"wlp4s0": "http://{{ .DeviceIP }}:{{ .AppPort }}",
|
"wlp4s0": "http://{{ .DeviceIP }}:{{ .AppPort }}",
|
||||||
"enp0s31f6": "http://{{ .DeviceIP }}:{{ .AppPort }}"
|
"enp0s31f6": "http://{{ .DeviceIP }}:{{ .AppPort }}"
|
||||||
},
|
},
|
||||||
|
@ -5,11 +5,6 @@
|
|||||||
"port": 8080,
|
"port": 8080,
|
||||||
"host": "arcad"
|
"host": "arcad"
|
||||||
},
|
},
|
||||||
"portal": {
|
|
||||||
"type": "_http._tcp",
|
|
||||||
"port": 8080,
|
|
||||||
"host": "arcad-portal"
|
|
||||||
},
|
|
||||||
"hextris": {
|
"hextris": {
|
||||||
"type": "_http._tcp",
|
"type": "_http._tcp",
|
||||||
"port": 8080,
|
"port": 8080,
|
||||||
@ -19,11 +14,6 @@
|
|||||||
"type": "_http._tcp",
|
"type": "_http._tcp",
|
||||||
"port": 8080,
|
"port": 8080,
|
||||||
"host": "arcad-test"
|
"host": "arcad-test"
|
||||||
},
|
|
||||||
"diffusion": {
|
|
||||||
"type": "_http._tcp",
|
|
||||||
"port": 8080,
|
|
||||||
"host": "arcad-diffusion"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,10 +3,6 @@
|
|||||||
"main": {
|
"main": {
|
||||||
"address": ":8080",
|
"address": ":8080",
|
||||||
"mappings": [
|
"mappings": [
|
||||||
{
|
|
||||||
"hostPattern": "portal.localhost.arcad.lan:*",
|
|
||||||
"target": "http://localhost:8082"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"hostPattern": "hextris.localhost.arcad.lan:*",
|
"hostPattern": "hextris.localhost.arcad.lan:*",
|
||||||
"target": "http://localhost:8083"
|
"target": "http://localhost:8083"
|
||||||
@ -15,14 +11,6 @@
|
|||||||
"hostPattern": "test.localhost.arcad.lan:*",
|
"hostPattern": "test.localhost.arcad.lan:*",
|
||||||
"target": "http://localhost:8084"
|
"target": "http://localhost:8084"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"hostPattern": "diffusion.localhost.arcad.lan:*",
|
|
||||||
"target": "http://localhost:8085"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"hostPattern": "arcad-portal.local:*",
|
|
||||||
"target": "http://localhost:8082"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"hostPattern": "arcad-hextris.local:*",
|
"hostPattern": "arcad-hextris.local:*",
|
||||||
"target": "http://localhost:8083"
|
"target": "http://localhost:8083"
|
||||||
@ -31,13 +19,9 @@
|
|||||||
"hostPattern": "arcad-test.local:*",
|
"hostPattern": "arcad-test.local:*",
|
||||||
"target": "http://localhost:8084"
|
"target": "http://localhost:8084"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"hostPattern": "arcad-diffusion.local:*",
|
|
||||||
"target": "http://localhost:8085"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"hostPattern": "*",
|
"hostPattern": "*",
|
||||||
"target": "http://localhost:8082"
|
"target": "http://localhost:8084"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user