diff options
author | Valery Piashchynski <[email protected]> | 2021-03-16 14:16:03 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-03-16 14:16:03 +0300 |
commit | 6958ad0069656cc71ec2e4cae1cfc69954ba7410 (patch) | |
tree | 5d3337f7adca8c0741a5a93d0501469c85ed8b99 | |
parent | 102e473110b9be0924193aeecd4b946a7053737e (diff) |
๐ท Correct the http internal redirect code
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | CHANGELOG.md | 20 | ||||
-rw-r--r-- | plugins/http/config/http.go | 2 | ||||
-rw-r--r-- | plugins/http/plugin.go | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 152b00e6..2bcd726c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ CHANGELOG ========= -v2.0.1 (23.03.2021) +v2.0.2 (06.04.2021) ------------------- - ๐ Fix: Bug with required Root CA certificate for the SSL, not it's optional. - ๐ New: HTTP/FCGI/HTTPS internal logs instead of going to the raw stdout will be displayed in the RR logger at the `Info` log level. @@ -18,26 +18,26 @@ v2.0.1 (09.03.2021) v2.0.0 (02.03.2021) ------------------- -- โ๏ธ Added shared server to create PHP worker pools instead of isolated worker pool in each individual plugin. -- ๐ง New plugin system with auto-recovery, easier plugin API. +- โ๏ธ Add a shared server to create PHP worker pools instead of isolated worker pool in each individual plugin. +- ๐ New plugin system with auto-recovery, easier plugin API. - ๐ New `logger` plugin to configure logging for each plugin individually. - ๐ Up to 50% performance increase in HTTP workloads. -- โ๏ธ Added **[Temporal Workflow](https://temporal.io)** plugin to run distributed computations on scale. -- โ๏ธ Added `debug` flag to reload PHP worker ahead of request (emulates PHP-FPM behavior). -- โ Eliminated `limit` service, now each worker pool incluides `supervisor` configuration. +- โ๏ธ Add **[Temporal Workflow](https://temporal.io)** plugin to run distributed computations on scale. +- โ๏ธ Add `debug` flag to reload PHP worker ahead of a request (emulates PHP-FPM behavior). +- โ Eliminate `limit` service, now each worker pool includes `supervisor` configuration. - ๐ New resetter, informer plugins to perform hot reloads and observe loggers in a system. -- ๐ซ Exposed more HTTP plugin configuration options. +- ๐ซ Expose more HTTP plugin configuration options. - ๐ Headers, static and gzip services now located in HTTP config. - ๐ Ability to configure the middleware sequence. - ๐ฃ Faster Goridge protocol (eliminated 50% of syscalls). -- ๐พ Added support for binary payloads for RPC (`msgpack`). +- ๐พ Add support for binary payloads for RPC (`msgpack`). - ๐ Server no longer stops when a PHP worker dies (attempts to restart). - ๐พ New RR binary server downloader. - ๐ฃ Echoing no longer breaks execution (yay!). - ๐ Migration to ZapLogger instead of Logrus. -- ๐ฅ RR can no longer stuck when studding down with broken tasks in pipeline. +- ๐ฅ RR can no longer stuck when studding down with broken tasks in a pipeline. - ๐งช More tests, more static analysis. -- ๐ฅ Created a new foundation for new KV, WebSocket, GRPC and Queue plugins. +- ๐ฅ Create a new foundation for new KV, WebSocket, GRPC and Queue plugins. v2.0.0-RC.4 (20.02.2021) ------------------- diff --git a/plugins/http/config/http.go b/plugins/http/config/http.go index d48ed022..8b63395f 100644 --- a/plugins/http/config/http.go +++ b/plugins/http/config/http.go @@ -97,7 +97,7 @@ func (c *HTTP) InitDefaults() error { } if c.SSLConfig.Address == "" { - c.SSLConfig.Address = ":443" + c.SSLConfig.Address = "127.0.0.1:443" } err := c.HTTP2Config.InitDefaults() diff --git a/plugins/http/plugin.go b/plugins/http/plugin.go index 0686f6b5..69d13bc8 100644 --- a/plugins/http/plugin.go +++ b/plugins/http/plugin.go @@ -418,7 +418,7 @@ func (s *Plugin) redirect(w http.ResponseWriter, r *http.Request) { RawQuery: r.URL.RawQuery, } - http.Redirect(w, r, target.String(), http.StatusTemporaryRedirect) + http.Redirect(w, r, target.String(), http.StatusPermanentRedirect) } // https://golang.org/pkg/net/http/#Hijacker |