feature #18197 Make Request::isFromTrustedProxy() public. (Peter Bex)
feature #18197 Make Request::isFromTrustedProxy() public. (Peter Bex)

This PR was merged into the 3.1-dev branch.

Discussion
----------

Make Request::isFromTrustedProxy() public.

| Q             | A
| ------------- | ---
| Branch        | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

When adding custom headers to your proxy (in our particular case, a `X-Base-Url` header, but it could be anything), it is necessary to be able to tell whether the request came from a trusted proxy or not. Unfortunately, currently the `isFromTrustedProxy()` method is private, which means you'll need to subclass `Request` and add your own *differently named* method just to be able to access this information.

This functionality is pretty straightforward, and I don't see a reason to keep this method private so this a trivial pull request to make it public (and it adds a comment so it'll show up in the API docs with proper documentation).

Commits
-------

286f64f Make Request::isFromTrustedProxy() public.

jvasseur/symfony,codeclimate-testing/symfony,GuilhemN/symfony,MisatoTremor/symfony,romainneutron/symfony,MatTheCat/symfony,HeahDude/symfony,Amo/symfony,backbone87/symfony,zorn-v/symfony,Aliance/symfony,chrisguitarguy/symfony,jjanvier/symfony,jvasseur/symfony,gimler/symfony,nicolas-grekas/symfony,voronkovich/symfony,geoffrey-brier/symfony,geoffrey-brier/symfony,Deamon/symfony,nasimnabavi/symfony,bendavies/symfony,frankdejonge/symfony,gencer/symfony,romainneutron/symfony,localheinz/symfony,weaverryan/symfony,sgehrig/symfony,MisatoTremor/symfony,MatTheCat/symfony,Deamon/symfony,symfony/symfony,phramz/symfony,patrick-mcdougle/symfony,derrabus/symfony,Engerim/symfony,bendavies/symfony,believer-ufa/symfony,teohhanhui/symfony,dunglas/symfony,okdana/symfony,jameshalsall/symfony,lepiaf/symfony,tgalopin/symfony,Amo/symfony,tgalopin/symfony,tgalopin/symfony,zcodes/symfony,e-moe/symfony,garak/symfony,joelwurtz/symfony,apfelbox/symfony,MatTheCat/symfony,fabpot/symfony,danionut90/symfony,nicolas-grekas/symfony,georaldc/symfony,mnapoli/symfony,Triiistan/symfony,ragboyjr/symfony,arjenm/symfony,apetitpa/symfony,jameshalsall/symfony,k0pernikus/symfony,dosten/symfony,alekitto/symfony,mickaelandrieu/symfony,pamil/symfony,damienalexandre/symfony,mickaelandrieu/symfony,deguif/symfony,pierredup/symfony,bendavies/symfony,c960657/symfony,josephdpurcell/symfony,docteurklein/symfony,sgehrig/symfony,docteurklein/symfony,hhamon/symfony,tucksaun/symfony,smatyas/symfony,jvasseur/symfony,hason/symfony,zcodes/symfony,paradajozsef/symfony,Einenlum/symfony,WouterJ/symfony,lemoinem/symfony,ragboyjr/symfony,teohhanhui/symfony,OskarStark/symfony,gonzalovilaseca/symfony,derrabus/symfony,tucksaun/symfony,ro0NL/symfony,garak/symfony,alekitto/symfony,Tobion/symfony,believer-ufa/symfony,WhiteEagle88/symfony,mweimerskirch/symfony,jameshalsall/symfony,maidmaid/symfony,MisatoTremor/symfony,derrabus/symfony,HeahDude/symfony,xabbuh/symfony,iltar/symfony,jean-gui/symfony,patrick-mcdougle/symfony,pyrech/symfony,unexge/symfony,georaldc/symfony,havvg/symfony,paradajozsef/symfony,codeclimate-testing/symfony,ewgRa/symfony,joelwurtz/symfony,localheinz/symfony,DavidGarciaCat/symfony,sstok/symfony,andreia/symfony,yceruto/symfony,mickaelandrieu/symfony,k0pernikus/symfony,Amo/symfony,georaldc/symfony,lyrixx/symfony,1ed/symfony,dosten/symfony,jderusse/symfony,damienalexandre/symfony,vincentaubert/symfony,andrerom/symfony,teohhanhui/symfony,jean-gui/symfony,smatyas/symfony,pix-art/symfony,WhiteEagle88/symfony,zorn-v/symfony,weaverryan/symfony,DavidGarciaCat/symfony,gimler/symfony,OskarStark/symfony,believer-ufa/symfony,lepiaf/symfony,gimler/symfony,pix-art/symfony,bendavies/symfony,josephdpurcell/symfony,natechicago/symfony,Koc/symfony,natechicago/symfony,unexge/symfony,Padam87/symfony,jvasseur/symfony,believer-ufa/symfony,damienalexandre/symfony,danionut90/symfony,zerkms/symfony,mickaelandrieu/symfony,dbu/symfony,ogizanagi/symfony,hhamon/symfony,zorn-v/symfony,MisatoTremor/symfony,oleg-andreyev/symfony,shieldo/symfony,iltar/symfony,zerkms/symfony,nasimnabavi/symfony,smatyas/symfony,jderusse/symfony,apfelbox/symfony,Taluu/symfony,okdana/symfony,1ed/symfony,chalasr/symfony,danionut90/symfony,hacfi/symfony,chalasr/symfony,Einenlum/symfony,andrerom/symfony,sstok/symfony,havvg/symfony,gnat42/symfony,e-moe/symfony,oleg-andreyev/symfony,oleg-andreyev/symfony,Nyholm/symfony,ewgRa/symfony,arjenm/symfony,believer-ufa/symfony,georaldc/symfony,jjanvier/symfony,shieldo/symfony,Nyholm/symfony,jzawadzki/symfony,d-ph/symfony,localheinz/symfony,deguif/symfony,maidmaid/symfony,hason/symfony,Triiistan/symfony,WhiteEagle88/symfony,josephdpurcell/symfony,dmaicher/symfony,Nyholm/symfony,Ener-Getick/symfony,Simperfit/symfony,dbu/symfony,docteurklein/symfony,dzuelke/symfony,lyrixx/symfony,gonzalovilaseca/symfony,alekitto/symfony,sstok/symfony,symfony/symfony,Aliance/symfony,1ed/symfony,apfelbox/symfony,dzuelke/symfony,deguif/symfony,Simperfit/symfony,klandaika/symfony,backbone87/symfony,stof/symfony,pix-art/symfony,Pierstoval/symfony,paradajozsef/symfony,nicolas-grekas/symfony,realityking/symfony,michaelperrin/symfony,apetitpa/symfony,jakzal/symfony,c960657/symfony,joelwurtz/symfony,natechicago/symfony,pamil/symfony,andreia/symfony,hhamon/symfony,Ener-Getick/symfony,alekitto/symfony,mweimerskirch/symfony,stof/symfony,smatyas/symfony,aeoris/symfony,nasimnabavi/symfony,sgehrig/symfony,natechicago/symfony,curry684/symfony,shieldo/symfony,klandaika/symfony,dosten/symfony,aeoris/symfony,dbu/symfony,andreia/symfony,pix-art/symfony,dunglas/symfony,zcodes/symfony,lstrojny/symfony,xabbuh/symfony,mickaelandrieu/symfony,neemzy/symfony,geoffrey-brier/symfony,jpauli/symfony,klandaika/symfony,ajgarlag/symfony,WouterJ/symfony,pierredup/symfony,weaverryan/symfony,andreia/symfony,chalasr/symfony,mnapoli/symfony,mnapoli/symfony,shieldo/symfony,curry684/symfony,romainneutron/symfony,tucksaun/symfony,mnapoli/symfony,Strate/symfony,sroze/symfony,romaricdrigon/symfony,k0pernikus/symfony,realityking/symfony,Simperfit/symfony,pyrech/symfony,symfony/symfony,localheinz/symfony,garak/symfony,voronkovich/symfony,kbond/symfony,yceruto/symfony,e-moe/symfony,jakzal/symfony,ro0NL/symfony,GuilhemN/symfony,lemoinem/symfony,tgalopin/symfony,romainneutron/symfony,stof/symfony,Slamdunk/symfony,zerkms/symfony,jzawadzki/symfony,gimler/symfony,pyrech/symfony,docteurklein/symfony,phramz/symfony,Padam87/symfony,chrisguitarguy/symfony,geoffrey-brier/symfony,jpauli/symfony,jderusse/symfony,believer-ufa/symfony,yceruto/symfony,danionut90/symfony,gencer/symfony,pierredup/symfony,fabpot/symfony,natechicago/symfony,andrerom/symfony,Slamdunk/symfony,xabbuh/symfony,vincentaubert/symfony,ewgRa/symfony,geoffrey-brier/symfony,mpdude/symfony,lstrojny/symfony,unexge/symfony,Padam87/symfony,Triiistan/symfony,chrisguitarguy/symfony,sroze/symfony,e-moe/symfony,symfony/symfony,DavidGarciaCat/symfony,pyrech/symfony,Ener-Getick/symfony,codeclimate-testing/symfony,Amo/symfony,chrisguitarguy/symfony,havvg/symfony,ro0NL/symfony,okdana/symfony,realityking/symfony,GuilhemN/symfony,pamil/symfony,1ed/symfony,lemoinem/symfony,lstrojny/symfony,ragboyjr/symfony,jderusse/symfony,dmaicher/symfony,aeoris/symfony,MatTheCat/symfony,dzuelke/symfony,apfelbox/symfony,mpdude/symfony,mweimerskirch/symfony,curry684/symfony,jean-gui/symfony,d-ph/symfony,geoffrey-brier/symfony,tucksaun/symfony,jpauli/symfony,HeahDude/symfony,mpdude/symfony,GuilhemN/symfony,c960657/symfony,realityking/symfony,iltar/symfony,neemzy/symfony,hacfi/symfony,Ener-Getick/symfony,jzawadzki/symfony,dzuelke/symfony,Deamon/symfony,teohhanhui/symfony,Padam87/symfony,danionut90/symfony,dunglas/symfony,xabbuh/symfony,arjenm/symfony,nicolas-grekas/symfony,Slamdunk/symfony,Engerim/symfony,dbu/symfony,Deamon/symfony,pix-art/symfony,phramz/symfony,docteurklein/symfony,jjanvier/symfony,deguif/symfony,jameshalsall/symfony,michaelperrin/symfony,romaricdrigon/symfony,lyrixx/symfony,jpauli/symfony,Triiistan/symfony,mweimerskirch/symfony,ragboyjr/symfony,gonzalovilaseca/symfony,jpauli/symfony,havvg/symfony,gnat42/symfony,gencer/symfony,michaelperrin/symfony,hacfi/symfony,ewgRa/symfony,dosten/symfony,c960657/symfony,sroze/symfony,jameshalsall/symfony,Ener-Getick/symfony,jjanvier/symfony,Amo/symfony,stof/symfony,Taluu/symfony,michaelperrin/symfony,Padam87/symfony,joelwurtz/symfony,chalasr/symfony,pix-art/symfony,Tobion/symfony,Simperfit/symfony,romainneutron/symfony,Simperfit/symfony,patrick-mcdougle/symfony,unexge/symfony,d-ph/symfony,danionut90/symfony,paradajozsef/symfony,Triiistan/symfony,zerkms/symfony,gnat42/symfony,dmaicher/symfony,hhamon/symfony,Deamon/symfony,iltar/symfony,ajgarlag/symfony,jakzal/symfony,fabpot/symfony,havvg/symfony,realityking/symfony,patrick-mcdougle/symfony,kbond/symfony,mnapoli/symfony,dmaicher/symfony,georaldc/symfony,backbone87/symfony,klandaika/symfony,codeclimate-testing/symfony,georaldc/symfony,MisatoTremor/symfony,Koc/symfony,klandaika/symfony,ajgarlag/symfony,MisatoTremor/symfony,jjanvier/symfony,voronkovich/symfony,curry684/symfony,Tobion/symfony,voronkovich/symfony,lepiaf/symfony,ogizanagi/symfony,neemzy/symfony,romaricdrigon/symfony,Tobion/symfony,ogizanagi/symfony,romaricdrigon/symfony,k0pernikus/symfony,jean-gui/symfony,Taluu/symfony,pierredup/symfony,ajgarlag/symfony,dosten/symfony,damienalexandre/symfony,Koc/symfony,fabpot/symfony,Taluu/symfony,dzuelke/symfony,WouterJ/symfony,lyrixx/symfony,zcodes/symfony,jakzal/symfony,kbond/symfony,ogizanagi/symfony,Nyholm/symfony,ro0NL/symfony,pamil/symfony,Strate/symfony,k0pernikus/symfony,zorn-v/symfony,mpdude/symfony,apfelbox/symfony,gonzalovilaseca/symfony,csarrazi/symfony,garak/symfony,Engerim/symfony,maidmaid/symfony,kbond/symfony,ewgRa/symfony,frankdejonge/symfony,oleg-andreyev/symfony,csarrazi/symfony,chrisguitarguy/symfony,sgehrig/symfony,Koc/symfony,Pierstoval/symfony,OskarStark/symfony,csarrazi/symfony,Slamdunk/symfony,gnat42/symfony,yceruto/symfony,maidmaid/symfony,nasimnabavi/symfony,apetitpa/symfony,Einenlum/symfony,sstok/symfony,frankdejonge/symfony,Strate/symfony,vincentaubert/symfony,ewgRa/symfony,GuilhemN/symfony,lemoinem/symfony,realityking/symfony,apetitpa/symfony,andrerom/symfony,patrick-mcdougle/symfony,Pierstoval/symfony,hason/symfony,jpauli/symfony,dbu/symfony,Einenlum/symfony,lemoinem/symfony,arjenm/symfony,weaverryan/symfony,d-ph/symfony,Ener-Getick/symfony,frankdejonge/symfony,Aliance/symfony,smatyas/symfony,mweimerskirch/symfony,Pierstoval/symfony,unexge/symfony,OskarStark/symfony,sstok/symfony,sroze/symfony,derrabus/symfony,HeahDude/symfony,phramz/symfony,natechicago/symfony,vincentaubert/symfony