Skip to content

Commit d4fd62d

Browse files
committed
nette/http 3.3.4
1 parent 8b46d74 commit d4fd62d

4 files changed

Lines changed: 26 additions & 0 deletions

File tree

http/cs/configuration.texy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ http:
108108
```
109109

110110

111+
Vynucení HTTPS .{data-version:3.3.4}
112+
------------------------------------
113+
114+
Bezpodmínečně vynutí HTTPS schéma požadavku. Hodí se pro weby běžící výhradně na HTTPS za load balancerem nebo reverzní proxy, která terminuje TLS, ale neposílá hlavičku `X-Forwarded-Proto`, takže by standardní detekce HTTPS (ani s nastavenou [#HTTP proxy]) nezabrala.
115+
116+
```neon
117+
http:
118+
# vynutí HTTPS schéma u všech požadavků
119+
forceHttps: true # (bool) výchozí je false
120+
```
121+
122+
111123
Session
112124
=======
113125

http/cs/request.texy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ RequestFactory lze před zavoláním `fromGlobals()` konfigurovat:
236236

237237
- metodou `$factory->setBinary()` vypnete automatické čištění vstupních parametrů od kontrolních znaků a neplatných UTF-8 sekvencí.
238238
- metodou `$factory->setProxy(...)` uvedete IP adresu [proxy serveru |configuration#HTTP proxy], což je nezbytné pro správnou detekci IP adresy uživatele.
239+
- metodou `$factory->setForceHttps()` .{data-version:3.3.4} vynutíte HTTPS schéma požadavku bez ohledu na prostředí serveru.
239240

240241
RequestFactory umožňuje definovat filtry, které automaticky transformují části URL požadavku. Tyto filtry odstraňují nežádoucí znaky z URL, které tam mohou být vloženy například nesprávnou implementací komentářových systémů na různých webech:
241242

http/en/configuration.texy

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ http:
108108
```
109109

110110

111+
Force HTTPS .{data-version:3.3.4}
112+
---------------------------------
113+
114+
Unconditionally forces the request scheme to HTTPS. This is useful for HTTPS-only sites running behind a load balancer or reverse proxy that terminates TLS but does not pass the `X-Forwarded-Proto` header, so the standard HTTPS detection (even with [#HTTP Proxy] configured) would not catch it.
115+
116+
```neon
117+
http:
118+
# force HTTPS scheme for all requests
119+
forceHttps: true # (bool) defaults to false
120+
```
121+
122+
111123
Session
112124
=======
113125

http/en/request.texy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ RequestFactory can be configured before calling `fromGlobals()`:
236236

237237
- using the `$factory->setBinary()` method disables automatic cleansing of input parameters from control characters and invalid UTF-8 sequences.
238238
- using the `$factory->setProxy(...)` method specifies the IP address of the [proxy server |configuration#HTTP Proxy], which is necessary for correct detection of the user's IP address.
239+
- using the `$factory->setForceHttps()` .{data-version:3.3.4} method forces the request scheme to HTTPS regardless of the server environment.
239240

240241
RequestFactory allows defining filters that automatically transform parts of the URL request. These filters remove unwanted characters from URLs that might have been inserted, for example, by incorrect implementations of comment systems on various websites:
241242

0 commit comments

Comments
 (0)