mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-05-06 05:38:50 +00:00
feat: binding ip with session
🛡️staying safe even your frontend was hacked
This commit is contained in:
@@ -114,6 +114,10 @@ func (provider *Provider) splitDomainSOA(ctx context.Context, domain string) (pr
|
||||
if soa, ok := r.Answer[0].(*dns.SOA); ok {
|
||||
zone := soa.Hdr.Name
|
||||
prefix := libdns.RelativeName(domain, zone)
|
||||
// Convert "@" to empty string for zone apex
|
||||
if prefix == "@" {
|
||||
prefix = ""
|
||||
}
|
||||
return prefix, zone, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package ddns
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -13,10 +12,6 @@ type testSt struct {
|
||||
}
|
||||
|
||||
func TestSplitDomainSOA(t *testing.T) {
|
||||
if ci := os.Getenv("CI"); ci != "" { // skip if test on CI
|
||||
return
|
||||
}
|
||||
|
||||
cases := []testSt{
|
||||
{
|
||||
domain: "www.example.co.uk",
|
||||
|
||||
Reference in New Issue
Block a user