File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed
contributing/documentation Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -1105,7 +1105,7 @@ authorization from inside a controller::
1105
1105
The ``createAccessDeniedException `` method was introduced in Symfony 2.5.
1106
1106
1107
1107
The :method: `Symfony\\ Bundle\\ FrameworkBundle\\ Controller\\ Controller::createAccessDeniedException `
1108
- method creates a special :class: `Symfony\\ Component\\ Security\\ Core\E xception\\ AccessDeniedException `
1108
+ method creates a special :class: `Symfony\\ Component\\ Security\\ Core\\ Exception\\ AccessDeniedException `
1109
1109
object, which ultimately triggers a 403 HTTP response inside Symfony.
1110
1110
1111
1111
Thanks to the SensioFrameworkExtraBundle, you can also secure your controller using annotations::
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ first need to configure the ``Psr4ClassLoader``:
59
59
60
60
First of all, the class loader is loaded manually using a ``require ``
61
61
statement, since there is no autoload mechanism yet. With the
62
- :method: `Symfony\C omponent\C lassLoader\P sr4ClassLoader::addPrefix ` call, you
62
+ :method: `Symfony\\ Component\\ ClassLoader\ \ Psr4ClassLoader::addPrefix ` call, you
63
63
tell the class loader where to look for classes with the
64
64
``Symfony\Component\Yaml\ `` namespace prefix. After registering the autoloader,
65
65
the Yaml component is ready to be used.
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ Attribution-Share Alike 3.0 Unported `License`_.
32
32
* *Other Rights * — In no way are any of the following rights affected by the
33
33
license:
34
34
35
- * Your fair dealing or fair use rights, or other applicable copyright
36
- exceptions and limitations;
35
+ * Your fair dealing or fair use rights, or other applicable copyright exceptions
36
+ and limitations;
37
37
38
- * The author's moral rights;
38
+ * The author's moral rights;
39
39
40
- * Rights other persons may have either in the work itself or in how
41
- the work is used, such as publicity or privacy rights.
40
+ * Rights other persons may have either in the work itself or in how the
41
+ work is used, such as publicity or privacy rights.
42
42
43
43
* *Notice * — For any reuse or distribution, you must make clear to others
44
44
the license terms of this work. The best way to do this is with a link
Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ Symfony2 adds automatically:
57
57
// For Varnish < 3.0
58
58
// esi;
59
59
}
60
+ /* By default Varnish ignores Cache-Control: nocache
61
+ (https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html#cache-control),
62
+ so in order avoid caching it has to be done explicitly */
63
+ if (beresp.http.Pragma ~ "no-cache" ||
64
+ beresp.http.Cache-Control ~ "no-cache" ||
65
+ beresp.http.Cache-Control ~ "private") {
66
+ return (hit_for_pass);
67
+ }
60
68
}
61
69
62
70
.. caution ::
You can’t perform that action at this time.
0 commit comments