Typecho HTTPS cannot log in to the background

Typecho HTTPS cannot log in to the background

Address of this article: blog.lucien.ink/archives/523

background

Because Baidu Cloud Accelerated HTTPS certificates are difficult to use, I recently migrated the CDN solution of the blog to Cloud Flare as a whole, and it will be slower if it is slower.

In addition, the SSL renewal of the pagoda has all kinds of ghosts from a certain version. For convenience, I directly chose half-pass encryption, that is [用户] -- HTTPS --> [Cloud Flare] -- HTTP --> [Server].

Immediately, I found a problem, the background login of Typecho could not go up, the specific performance is that after the login jump, it still stays on the login interface.

solution

I found the corresponding solution on GitHub, edit the file in the root directory of the Typecho site , andconfig.inc.php add a line at the end define('__TYPECHO_SECURE__',true);.

The cause of the problem, I guess, is that the interaction between the user and the browser is HTTPS, but in fact, PHP receives the HTTP interaction from Cloud Flare, so PHP uses HTTP to respond, combined with some features of Typecho to form this problem.

Guess you like

Origin blog.csdn.net/xs18952904/article/details/124395376