Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route() and https #39

Open
modenaa opened this issue Oct 9, 2014 · 1 comment
Open

route() and https #39

modenaa opened this issue Oct 9, 2014 · 1 comment

Comments

@modenaa
Copy link

modenaa commented Oct 9, 2014

Hi

I am trying to force the route() to output https rather the default http it produces. I have also tried URL::secure(route(cpanel etc)) with no luck. Any suggestions would be be appreciated.

Thanks

@jorgecolonconsulting
Copy link
Collaborator

@modenaa

If you use:

route(‘cpanel.login’);

You'll get a url to the cpanel login url. From what I understand route() will return https:// if you're already navigating the website with https:// prepended to the URL. So one option is to force SSL at the application level with a route filter: http://www.laravel-tricks.com/tricks/redirect-all-traffic-to-https-force-ssl. You could also do this at the web server level with using rewriting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants