NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
Packagist
Packagist, #1354 most downloaded on Packagist
π Nette HTTP: the request, response, URL, cookies, sessions and file uploads as objects, with sanitized input and same-origin protection against CSRF.
Latest stable
v3.4.2
Last release 1 months ago
23 Oct 2026
Release timing varies
gaps range from 2 weeks to 10 months
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
63 releases Β· first in 2014
Drag across the ruler to compare, or tap a release to open it.
PHP 8.6 is officially supported
$sameSite and $partitioned parameters, so code typed against the interface passes static analysis when using them (#247)Url and UrlImmutable returns IPv6 addresses with an embedded IPv4 part ([::ffff:192.0.2.1]) and 0.0.0.0 whole instead of splitting them at the dots (#241)Behind a trusted proxy, the DI configuration now honors only the X-Forwarded-* headers by default, so a Forwarded header sent by the client cannot spo
X-Forwarded-* headers by default, so a Forwarded header sent by the client cannot spoof the address or host. If your proxy sets Forwarded, configure http: proxyHeaders: forwarded (or both)null when the forwarded client value is not a valid IP address (an obfuscated identifier or a broken chain)http: baseUrl option give CLI scripts (cron, tasks, MCP servers) a real request URL, so %baseUrl%, LinkGenerator, $baseUrl in templates and assets work outside the web server too. It applies only when no host can be detected, so web requests are unaffectedhttp: proxyHeaders option (both|xForwarded|forwarded|none) and the new flags of RequestFactory::setProxy() choose which forwarding headers your proxy is trusted forForwarded header$path or $domain as given (the root path or a host-only cookie); only null falls back to the configured defaultsYour coding agent can read these notes before it upgrades. Set up the MCP server β
The long-deprecated UserStorage is removed β use Nette\Bridges\SecurityHttp\SessionStorage from nette/security
The headline is protection against SSRF: the new UrlValidator and IPAddress check a URL before your application fetches it from the server.
Nette\Bridges\SecurityHttp\SessionStorage from nette/securitynull, as the reverse DNS lookup was slow and unreliable; resolve the host from getRemoteAddress() yourself if you need it (#218)setCookie(), setExpiration() and the session is always a relative number of seconds; an absolute Unix timestamp still works but triggers a deprecation, so pass a DateTimeInterface insteadCURLOPT_RESOLVE) and defeat DNS rebindingisPublic(), isPrivate(), isLoopback() and other predicates, CIDR matching via isInRange() and normalization of IPv4-mapped IPv6 addressesSec-Fetch-Site, Sec-Fetch-Dest and Sec-Fetch-User headers; in browsers without them (Safari < 16.4) it falls back to the strict cookie, so it works everywheresetCookie() and SessionPartitioned attribute (CHIPS) for third-party cookies, sends Max-Age, which does not depend on the client's clock, and adds Secure automatically for SameSite=None, which browsers would reject otherwise; deleteCookie() removes the cookie immediately thanks to Max-Age=0IResponse::SameSite* constants β use the SameSite enumRequest::isSameSite() β use isFrom([FetchSite::SameSite, FetchSite::SameOrigin])Helpers::ipMatch() β use IPAddress::tryFrom($ip)?->isInRange($mask)Security: the client address behind a trusted proxy is now taken from the rightmost untrusted hop of Forwarded / X-Forwarded-For , so a client cannot
Forwarded / X-Forwarded-For, so a client cannot spoof it by prepending its own entry. Scheme and host are read from that same hop, and getRemoteAddress() returns null when the forwarded value is not a valid IP.UserStorage::setNamespace() now works when switching to another namespace after the storage has been usedRequestFactory::setForceHttps() β force the request scheme to HTTPS regardless of the server environment, handy behind proxies and load balancers that
http: forceHttps: true.null for any Origin header that isn't a bare scheme://host[:port] (e.g. headers containing a path are rejected instead of being silently accepted).Nette\Http namespace β better IDE autocompletion and PHPStan inference for Request, Response, Session, Url and friends.Url, UrlImmutable: user & password are deprecated
Url, UrlImmutable: user & password are deprecated
resolve()isAbsolute() & removeDotSegments()build() methodUrl::canonicalize() char " does not need to be encodedFileUpload::__construct() accepts pathresolve()isAbsolute() & removeDotSegments()build() methodUrl::canonicalize() char " does not need to be encodedFileUpload::__construct() accepts pathFileUpload::getSanitizedName() changes the extension only for image files #239
FileUpload::getSanitizedName() changes the extension only for image files #239requires PHP 8.1 uses PHP 8.1 features
FileUpload: added getSuggestedExtension()
getSuggestedExtension()FileUpload: detects supported images
SessionExtension: don't set readAndClose if null
Session::getSectionNames(), replacement for getIterator()IRequest::getRemoteHost() is silently deprecated
BC break:
$httpRequest->getUrl()->getUser() + getPassword()
// changed to
[$user, $pass] = $httpRequest->getBasicCredentials();
New features:
Deprecations:
SessionExtension: don't set readAndClose if null
Request::getReferer() is deprecated #210
Request::getReferer() is deprecated #210RequestFactory: support for PHP built-in web server nette-examples/user-authentication#3
Request::getOrigin()SessionExtension: added values 'always' & 'never' for option 'autoStart'
autoStart() to prevent session files from being created when the session id is spoofedremove() is not writing operationset(), get(), remove()clean()HttpExtension: added option 'disableNetteCookie' #205
destroy() (#204)SessionSection: __get() returns reference
sendAsFile()__get() returns reference (#191)(#192)For the details you can have a look at the diff.
Response: deprecated $cookieHttpOnly
nette-samesite renamed to _nssSessionExtension: default is autoStart = false to avoid creating new session files if the session_id is spoofed (BC break)
set(), get(), remove()clean()HttpExtension: added option 'disableNetteCookie' #205
destroy() (#204)FileUpload: added getImageFileExtension()
getImageFileExtension()getUntrustedName() as alias for getName()getimagesize() returns false (#184)initCookie() sends cookie nette-samesite only if doesn't existFor the details you can have a look at the diff.
Url::parseQuery() fixed parsing of ; #177
parseQuery() fixed parsing of ; #177For the details you can have a look at the diff.
HttpExtension: added support for 'http:' in CSP
parseQuery() accepts separator ;For the details you can have a look at the diff.
Session: added read_and_close configuration
withoutUserInfo()For the details you can have a look at the diff.
DI extensions: are using configuration Schema
session_status() for better cooperation with the session started outside nette nette/forms#214[] in REMOTE_ADDR #152escapeHtml()For the details you can have a look at the diff.
IRequest, IResponse, Url: parameters $default are deprecated (BC break)
Nothing published for this version
Session: do not regenerate session ID when is newly created
For the details you can have a look at the diff.
Request, HttpExtension: added sameSite protection
setCookie() supports SameSiteremoveDuplicateCookies() #139For the details you can have a look at the diff.
SessionPanel: compatibility with Tracy 2.5
For the details you can have a look at the diff.
HttpExtension: allow setup CSP in restrictive and report mode at the same time #136 #135
session_set_cookie_params() when values was not changed #134 #23For the details you can have a look at the diff.
silenced each() deprecation notice in PHP 7.2
each() deprecation notice in PHP 7.2For the details you can have a look at the diff.
coding style: fixes, lowercase true/false/null
For the details you can have a look at the diff.
Session: configuration options are normalized in setOptions() instead of configure() #121
setOptions() instead of configure() #121getDomain()For the details you can have a look at the diff.
HttpExtension: added option 'csp' for Content-Security-Policy
setCode() added $reasonFor the details you can have a look at the diff.
Http\Response::setCode produces valid HTTP header on nginx
removeExpiration() fixed (#111)For the details you can have a look at the diff.
Session: removed cookie nette-browser and support for expiration 'until the browser is closed'
For the details you can have a look at the diff.
Url::getHostUrl() doesn't return empty // #96
hasFile() (#97)getHostUrl() doesn't return empty // #96For the details you can have a look at the diff.
HttpExtension: service http.context is deprecated
setExpiration() removes header Pragmamove() do not suppress system warnings #82For the details you can have a look at the diff.
Session: configuration options are normalized in setOptions() instead of configure() #121
setOptions() instead of configure() #121For the details you can have a look at the diff.
Http\Response::setCode produces valid HTTP header on nginx and PHP >= 5.4
removeExpiration() fixed (#111)For the details you can have a look at the diff.
Session: removed duplicated warning about sent headers
setExpiration() removes header PragmaFor the details you can have a look at the diff.
RequestFactory: Fixed possible remoteAddr spoofing (issue #87)
ob_start() is protected against flush when error occursFor the details you can have a look at the diff.
Nothing published for this version
IRequest: added PATCH method constant
@property phpDocFor the details you can have a look at the diff.
Session: session ID is not regenerated when not set
For the details you can have a look at the diff.
Helpers: fixed ipMatch() for IPv4 #61
For the details you can have a look at the diff.
Url: fixed isEqual() for same param values & regular sorting on numbers
For the details you can have a look at the diff.
Response::date(), Request::isPost() & Request::getFile() with multiple keys are deprecated
Helpers::formatDate(), added IResponse::getHeader() (BC break)Request::getUrl() is immutableResponse::date(), Request::isPost() & Request::getFile() with multiple keys are deprecatedRequestFactory: Fixed possible remoteAddr spoofing (issue #87)
@property phpDocFor the details you can have a look at the diff.
Nothing published for this version
Helpers: fixed ipMatch() for IPv4 #61
For the details you can have a look at the diff.
Url: fixed isEqual() for same param values & regular sorting on numbers
For the details you can have a look at the diff.
HttpRequest: drops non-UTF8 strings, but control characters only removes
For the details you can have a look at the diff.
RequestFactory: optimized UTF-8 validation performance
For the details you can have a look at the diff.
Response::redirect() link is printed only for https? protocols Closes #24
For the details you can have a look at the diff.
Nothing published for this version
Url::isEqual: improved, fixed comparing of indexed arrays
For the details you can have a look at the diff.
One column per quarter.