Skip to content

Commit

Permalink
Merge branch 'XTLS:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
omengye authored Sep 23, 2024
2 parents 6598058 + acbf36e commit 45f8bf4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions transport/internet/splithttp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ func (c *Config) GetRequestHeader() http.Header {
}

func (c *Config) WriteResponseHeader(writer http.ResponseWriter) {
// CORS headers for the browser dialer
writer.Header().Set("Access-Control-Allow-Origin", "*")
writer.Header().Set("Access-Control-Allow-Methods", "GET, POST")
paddingLen := c.GetNormalizedXPaddingBytes().roll()
if paddingLen > 0 {
writer.Header().Set("X-Padding", strings.Repeat("0", int(paddingLen)))
Expand Down

0 comments on commit 45f8bf4

Please sign in to comment.