2026-06-08

This commit is contained in:
Qin tian
2026-06-08 19:20:35 +08:00
parent 087d778a25
commit 505b77b76d

View File

@@ -4,6 +4,8 @@
package SunnyNet
import (
"io"
"github.com/qtgolang/SunnyNet/src/http"
)
@@ -21,3 +23,11 @@ func (s *Sunny) SetScriptCode(code string) string {
func (s *Sunny) SetScriptPage(Page string) string {
return "no"
}
func allowOrigin(t string, w io.Writer) {
w.Write([]byte(t + "\r\n"))
w.Write([]byte("Access-Control-Allow-Origin: *\r\n"))
w.Write([]byte("Access-Control-Allow-Methods: *\r\n"))
w.Write([]byte("Access-Control-Allow-Headers: *\r\n"))
w.Write([]byte("Access-Control-Expose-Headers: *\r\n"))
}