From ruby-forum-incoming at andreas-s.net Thu Jul 5 16:41:13 2012 From: ruby-forum-incoming at andreas-s.net (Pramit Roy) Date: Thu, 05 Jul 2012 18:41:13 +0200 Subject: [typo] SSL support in Typo Message-ID: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> 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? -- Posted via http://www.ruby-forum.com/. From matijs at matijs.net Thu Jul 5 17:22:49 2012 From: matijs at matijs.net (Matijs van Zuijlen) Date: Thu, 05 Jul 2012 19:22:49 +0200 Subject: [typo] SSL support in Typo In-Reply-To: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> References: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> Message-ID: <4FF5CD69.2000304@matijs.net> 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, -- Matijs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 482 bytes Desc: OpenPGP digital signature URL: From ruby-forum-incoming at andreas-s.net Thu Jul 5 17:58:30 2012 From: ruby-forum-incoming at andreas-s.net (Pramit Roy) Date: Thu, 05 Jul 2012 19:58:30 +0200 Subject: [typo] SSL support in Typo In-Reply-To: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> References: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> Message-ID: 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). -- Posted via http://www.ruby-forum.com/. From ruby-forum-incoming at andreas-s.net Fri Jul 6 06:05:43 2012 From: ruby-forum-incoming at andreas-s.net (Pramit Roy) Date: Fri, 06 Jul 2012 08:05:43 +0200 Subject: [typo] SSL support in Typo In-Reply-To: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> References: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> Message-ID: <65971dc75613b081a0772c89b389107f@ruby-forum.com> 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. -- Posted via http://www.ruby-forum.com/. From ruby-forum-incoming at andreas-s.net Fri Jul 6 10:10:26 2012 From: ruby-forum-incoming at andreas-s.net (Pramit Roy) Date: Fri, 06 Jul 2012 12:10:26 +0200 Subject: [typo] SSL support in Typo In-Reply-To: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> References: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> Message-ID: <85dcef482734af6e10c1e93c63d9c7a0@ruby-forum.com> Figured out the problem. url_for() returns http URL unless specified with protocol -- Posted via http://www.ruby-forum.com/. From matijs at matijs.net Sun Jul 8 11:53:51 2012 From: matijs at matijs.net (Matijs van Zuijlen) Date: Sun, 08 Jul 2012 13:53:51 +0200 Subject: [typo] SSL support in Typo In-Reply-To: <85dcef482734af6e10c1e93c63d9c7a0@ruby-forum.com> References: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> <85dcef482734af6e10c1e93c63d9c7a0@ruby-forum.com> Message-ID: <4FF974CF.1050400@matijs.net> 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. -- Matijs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 482 bytes Desc: OpenPGP digital signature URL: From ruby-forum-incoming at andreas-s.net Wed Jul 11 03:00:41 2012 From: ruby-forum-incoming at andreas-s.net (Pramit Roy) Date: Wed, 11 Jul 2012 05:00:41 +0200 Subject: [typo] SSL support in Typo In-Reply-To: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> References: <16fe24653728064a789b7de53ae98c8b@ruby-forum.com> Message-ID: Sure, will do.. Thanks for your help. -- Posted via http://www.ruby-forum.com/.