Skip to content

Commit

Permalink
sync merge (add request headers for static files) to dev
Browse files Browse the repository at this point in the history
  • Loading branch information
janusec2 committed Oct 28, 2023
1 parent beae165 commit 81e84eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ When listen=true in config.json :
> https://`your_primary_node_domain_name:9443`/janusec-admin/ (after certificate configured)
When using primary node only, any application domain name can be used for admin.
But if you have one or more replica nodes, you should apply for a seperate domain name for primary node.
But if you have one or more replica nodes, you should apply for a separate domain name for primary node.

[Janusec Application Gateway Configuration](https://janusec.github.io/documentation/quick-start/)

Expand Down
4 changes: 4 additions & 0 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ func ReverseHandlerFunc(w http.ResponseWriter, r *http.Request) {
utils.DebugPrintln("Check Update NewRequest", err)
}
if err == nil {
// copy request headers
for k := range r.Header {
req.Header.Set(k, r.Header.Get(k))
}
req.Header.Set("Host", domainStr)
modTimeGMT := fi.ModTime().UTC().Format(http.TimeFormat)
//If-Modified-Since: Sun, 14 Jun 2020 13:54:20 GMT
Expand Down

0 comments on commit 81e84eb

Please sign in to comment.