my entire application should accessed on https, vhost correctly configured , when call of application pages https prefix, responds correctly.
however when try access page through generated link within application. points regular http link.
i first tried redirect traffic https using .htaccess file. spent few hours trying every redirect method find on net ended having infinite redirect loop reason.
now i'm trying approach in different way: generating directly links in https. links generated using url() function provided twig-bridge.
it pretty easy configure symfony
but couldnt figure out how silex. there easy way change routing scheme in silex force every link generated https prefix ?
adding requirehttps() routes generator, trick.
example:
$app->get('/hello-world', function($app) { return 'hello world'; }) ->bind('hello') // set route name (optional of course) ->requirehttps(); // force url https:// you can @ api more information. find need there.
Comments
Post a Comment