Igor, that wil be `->setPrefix()` after I modify the PR, is it ok with you ?

On 02/11/2013 03:12 PM, Igor Wiedler wrote:
>
> In src/Symfony/Component/HttpFoundation/JsonResponse.php:
>
> > @@ -89,6 +90,22 @@ public function setData($data = array())
> >      }
> >
> >      /**
> > +     * Mitigates CSRF attack by prepending a prefix to the generated JSON.
> > +     *
> > +     * @see http://stackoverflow.com/questions/2669690
> > +     *
> > +     * @param string $prefix The prefix to prepend to the generated JSON
> > +     *
> > +     * @return JsonResponse
> > +     */
> > +    public function prefixJson($prefix = 'while(1);')
>
> Maybe |addJsonCsrfPrefix()| since re-typing |while(1);| into 
> controllers is kind of annoying.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/symfony/symfony/pull/6970/files#r2961507>..
>