aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http/Response.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: Add SPDX headerAndy Scherzinger2024-05-241-28/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(AppFramework): Fix error message about 204 not allowing custom headersprovokateurin2024-04-081-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Stop sending deprecated Pragma headerGit'Fellow2023-08-281-4/+3
| | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* chore: Replace \OC::$server->query with \OCP\Server::get in /libChristoph Wurst2023-07-061-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add template types to responsesjld31032023-06-301-28/+40
| | | | Signed-off-by: jld3103 <jld3103yt@gmail.com>
* Change X-Robots-Tag header from "none" to "noindex, nofollow"MichaIng2023-02-151-1/+1
| | | | | | | | | | While "none" is indeed equivalent to "noindex, nofollow" for Google, but seems to be not supported by Bing and probably other search engines. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name#other_metadata_names https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag?hl=de#comma-separated-list https://www.bing.com/webmasters/help/which-robots-metatags-does-bing-support-5198d240 Signed-off-by: MichaIng <micha@dietpi.com>
* composer run cs:fixCôme Chilliet2023-01-201-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Add description for public and immutableDaniel2022-09-031-2/+2
| | | | Co-authored-by: Carl Schwan <carl@carlschwan.eu> Signed-off-by: Daniel <mail@danielkesselberg.de>
* Update docblock for cacheForDaniel Kesselberg2022-09-031-2/+4
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Improve caching policyCarl Schwan2022-02-161-2/+2
| | | | | | | | | | | | | | * Cache css with version in url. This makes most js and css requests to be cached by the browser * Force caching previews, the etag is in the url so that if the propfind gives a new etag, we will refresh it otherwise it's no use to try to fetch the new etag and do tons of DB queries Tested with firefox and 'debug' => false (important so that the js/css urls are generated with ?v= parameter) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* send request id in response headerRobin Appelman2022-02-011-0/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Move DateTime::RFC2822 to DateTimeInterface::2822Christoph Wurst2021-06-231-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-6/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Make debugging easier which header is being setJoas Schilling2021-03-241-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Log an error when setting a custom header on "Not Modified" responsesJoas Schilling2020-12-151-0/+14
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix robots "noindex, nofollow" signalsJoas Schilling2020-06-251-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Allow to specify the cookie type for appframework responsesRoeland Jago Douma2020-06-221-2/+3
| | | | | | | | | In general it is good to set them to Lax. But also to give devs more control over them is not a bad thing. Helps with #21474 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add public argument to Http cacheFor()Clement Wong2020-05-101-5/+4
| | | | Signed-off-by: Clement Wong <git@clement.hk>
* Proxy server could cache http response when it is not privateClement Wong2020-05-101-2/+2
| | | | Signed-off-by: Clement Wong <git@clement.hk>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-7/+7
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Do not enforce the parent constructor of response to be calledRoeland Jago Douma2019-08-191-10/+8
| | | | | | | If there is no policy set we just take the default empty ones. That way no obscure errors get thrown if the constructor is not called. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add feature policy headerRoeland Jago Douma2019-08-101-0/+23
| | | | | | | This adds the events and the classes to modify the feature policy. It also adds a default restricted feature policy. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Set empty CSP by defaultRoeland Jago Douma2019-04-161-0/+9
| | | | | | | | | For #14179 By default responses should have the strictest (and simplest) CSP possible. Only template responses should require an actual CSP. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move caching logic to responseRoeland Jago Douma2018-06-041-2/+14
| | | | | | | | | | This avoids having to do it at all the places we want cached responses. We can't inject the ITimeFactor without breaking public API. However we can perfectly overwrite the service (resulting in the same testable effect). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make sure that render always returns a stringRoeland Jago Douma2018-02-211-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-061-0/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #5907 from nextcloud/add-metadata-to-throttle-callMorris Jobke2017-08-011-1/+15
|\ | | | | Add metadata to \OCP\AppFramework\Http\Response::throttle
| * Add metadata to \OCP\AppFramework\Http\Response::throttleLukas Reschke2017-07-271-1/+15
| | | | | | | | | | | | Fixes https://github.com/nextcloud/server/issues/5891 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* | Replace wrong PHPDocsLukas Reschke2017-08-011-1/+1
|/ | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* Make BruteForceProtection annotation more cleverLukas Reschke2017-04-131-0/+19
| | | | | | | | This makes the new `@BruteForceProtection` annotation more clever and moves the relevant code into it's own middleware. Basically you can now set `@BruteForceProtection(action=$key)` as annotation and that will make the controller bruteforce protected. However, the difference to before is that you need to call `$responmse->throttle()` to increase the counter. Before the counter was increased every time which leads to all kind of unexpected problems. Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* set 'no-store' cache header if we do not want FF to cacheChristoph Wurst2017-01-091-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add trict CSP to OCS responsesRoeland Jago Douma2016-09-151-3/+3
| | | | | If a repsonse now explicitly has the Empty CSP set then the middleware won't touch it.
* Cache avatars properlyRoeland Jago Douma2016-08-301-2/+1
| | | | | * Set proper caching headers for avatars (15 minutes) * For our own avatar use some extra logic to invalidate when we update
* Fix othersJoas Schilling2016-07-211-1/+2
|
* Update license headersLukas Reschke2016-05-261-1/+1
|
* Move \OCP\AppFramework to PSR-4Roeland Jago Douma2016-05-061-0/+326