Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-30 05:09:13

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

SSL for either admin or public site?

r1765 introduces https as a sitewide protocol option. Wouldn’t it be reasonable to split this option into two, one for the public site and one for admin access ?

Offline

#2 2006-08-30 08:01:35

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: SSL for either admin or public site?

Alternatively, what about something like this:

define('PROTOCOL', (strtolower(serverSet('HTTPS')) == 'on' ? 'https://' : 'http://'));

Alex

Offline

#3 2006-08-30 08:19:59

wet
Developer Emeritus
From: Vöcklabruck, Austria
Registered: 2005-06-06
Posts: 3,391
Website GitHub Mastodon

Re: SSL for either admin or public site?

Caveat: There are bridges (front side article edit links, e.g. rss_article_edit, and the “View site” link on the admin side). Automatic determination of protocol prefix would eventually carry preferences from one side onto the other, which might no be desirable.

Offline

#4 2006-08-30 09:16:54

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: SSL for either admin or public site?

Split protocol for admin/public side is a nice feature.
But our first step is being able to use ssl at all without having to touch code in lots of places.

The auto-selecting of zem has the advantage that the user can choose at anytime – I am guessing that most people have their admin-side bookmarked, so to a degree (with your mentioned caveats) you could already use split protocols for public/admin-side (or you can force it with a rewrite-rules in the webserver).

Offline

#5 2006-08-31 01:56:26

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: SSL for either admin or public site?

That seems like a reasonable solution to me, at least to begin with: auto-selection on both the admin and user sides; rewrite/redirect rules or special bookmarks to force one way or the other.

Ultimately we might need some combination of global settings, and overriding for specific pages and/or tags (perhaps <txp:permlink https=1 /> or something like that). Let’s start with something simple and see where it takes us.


Alex

Offline

#6 2006-10-06 10:44:39

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: SSL for either admin or public site?

Now that I finally got around to testing it, I’ve checked in zem’s suggestion above. Textpattern will automatically detect and accomodate for whether the connection is SSL-secured or not. If there is a desire that some parts shouldy only/not be reachable via SSL, this should currently be configured on the server.

Usually people that have SSL-certificates are also in a position to configure the webserver to redirect/deny-access to certain domains/directories depending on whether SSL is used or not. Hence I don’t think duplicating that in Textpattern should be a high priority (plus it could be solved by plugins with output-buffering and rewriting links)

Offline

Board footer

Powered by FluxBB