SSL support in Typo

I have added SSL support to WEBRick for Typo, the problem is that, URL
to any new page is not having “https”, rest are still OK. I did not go
through the code of typo much, where can it be changed from?

Hi,

On 05/07/12 18:41, Pramit Roy wrote:

I have added SSL support to WEBRick for Typo, the problem is that, URL
to any new page is not having “https”, rest are still OK. I did not go
through the code of typo much, where can it be changed from?

Can you provide some more details? What did you change? Where do the
incorrect
URLs appear? Is it possible to access the new page with https by typing
it in
the address bar?

As far as I know, there is only one place where the protocol part of the
URIs is
configured: In the base url setting for the blog. Therefore, it’s odd
that http:
should still appear once you have changed that.

Regards,

Hey Matijs,

Thank you very much for your quick reply. Yes, it possible to access the
new page with https by typing it in the address bar.

I have not changed any base URL setting from the blog code or config.
All I did is to add a default_options for Rack server by adding a module
in script/rails. After that I can access the blog site by putting
https:. Now I have also noticed that for few links (like Home, RSS etc)
the URL is being retrieved from DB (from blog table) which was also not
being changed automatically before I changed it from DB.

Now most of the links that I have checked are OK (coming with https)
only problem is with “Page” section where any page is having “http:” in
its URL.

So now my question is, could you please let me know where can I change
base URL from typo code?
Hopefully that is still adding http and others are using relative path
so getting https (just a theory).

I can see from application controller that it gets the base URL from
page address which is working fine when I have https in URL. In one case
it gets this_blog.base_url which is retrieved from DB and that was set
during the setup process. As it was http while setting up it had http as
the value. But I fixed that also. The only one thing remaining is from
navigation bar where I have page links printed as
“http://…/page/page-permalink”. I am sure this is being set apart from
base_url value in controller or blog_base_url value from DB. So could
anyone direct me where from the URLs for “page” in Typo are being
generated?

Here is an example blog for you to check

https://pramit.info:3333/

You can see from nav bar below header image that both “Home” and
“Articles” have HTTPS, only “About” page is having HTTP. Which is the
same in admin panel also. That does not work by creating redirect rule
from inside Typo.

Figured out the problem.

url_for() returns http URL unless specified with protocol

On 06/07/12 12:10, Pramit Roy wrote:

Figured out the problem.

url_for() returns http URL unless specified with protocol

If you can prepare a patch to fix this, I’d be interested.

Sure, will do…
Thanks for your help.