F3 and HTTPS

72 views
Skip to first unread message

Nuwanda

unread,
Mar 14, 2017, 5:52:31 PM3/14/17
to Fat-Free Framework
I'm developing a site on a non-HTTPS server but will be transferring it to a secure server.

As far as F3 is concerned, is there anything I should do during development to make the transition easier?

bcosca

unread,
Mar 14, 2017, 7:46:28 PM3/14/17
to f3-fra...@googlegroups.com
Transition should take minimal effort if all pages and resources will be served using HTTPs and not a mixture.

Anatol

unread,
Mar 17, 2017, 3:43:37 AM3/17/17
to Fat-Free Framework
Hi Nuwanda,

I´m serving my static files via a subdomain. (The cert is wildcard).
To build the path to a static file SCHEME was of big help. -> https://fatfreeframework.com/3.6/quick-reference#SCHEME
With this I don´t have to care regarding https or not.

For local development I´ve setup a self signed cert (and accepted it in my browser) to test everything with and without https
before staging.

cheers,

– Anatol

Nuwanda

unread,
Mar 18, 2017, 3:27:40 AM3/18/17
to f3-fra...@googlegroups.com
Thanks, Anatol.

I haven't had a chance to try it yet but I guessed I'd have to use a framework variable to insert the correct protocol into a given url.

But I was thinking that simply using realtive links like  "//route/segment/segment" instead of "http://route/segment/segment" would do the same.  No?

I'm using Nginx and was thinking all I'd need to do in the nginx config was redirect all traffic to https.

Frankly, it's a little confusing. All I want is a solution that regardless of what link a user accesses a route by they will always get https.

Anatol

unread,
Mar 18, 2017, 4:03:57 AM3/18/17
to f3-fra...@googlegroups.com
Hey nuwanda,

Yeah the Protocol aware notation should work here as well. And true you should just rewrite http to https and it should work.
I haven´t had any problems with f3 and https so far. One thing which comes to my mind is Cookie handling. See: http://stackoverflow.com/a/22222151/1474777
I ' ve never checken how f3 sets cookies .... But never had problems either ...


Cheers

Anatol

Reply all
Reply to author
Forward
0 new messages