Diary

Nginx reverse proxy WordPress mixed content error (HTTPS/HTTP)

1 Mins read

In an Nginx reverse proxy setup where the frontend Nginx accepts requests on 443 (HTTPS) and performs round-robin load balancing internally on 80 (HTTP), you may encounter a Mixed Content error in Chrome.

To fix this, add the following to the top of wp-config.php:

/** mixed content the page at ' url ' was loaded over https wordpress nginx */
/** When using proxy settings, you need to set it to redirect via https! */
/** Note: The HTTP_X_FORWARDED_FOR environment variable name may vary slightly depending on your server environment (AWS, etc.), so verify it */
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
    $_SERVER['HTTPS'] = 'on';
}

If you can modify the nginx.conf file on the internal 80 (HTTP) side, you can also use this approach:

Either option works fine.

location ~ \.php$ {
    include fastcgi_params;

    # mixed content the page at ' url ' was loaded over https wordpress nginx
    # When using proxy settings, you need to set it to redirect via https! From here
    fastcgi_param HTTPS on;
    fastcgi_param HTTP_X_FORWARDED_PROTO https;
    # To here

    fastcgi_intercept_errors on;
    fastcgi_pass php-fpm;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
Read more
Diary

Rails 7.0.8.7 Update Startup Error "Logger::Severity.constants.each do |severity|"

1 Mins read

Ruby 3.2.6

Ruby on Rails 7.0.8.7

Fails on startup

The cause is the gem

gem 'concurrent-ruby', '1.3.5'

Add to the end of Gemfile and pin it for now

gem 'concurrent-ruby', '1.3.4'

After adding, install

bundle install

# Fetching concurrent-ruby 1.3.4 (was 1.3.5)
# Installing concurrent-ruby 1.3.4 (was 1.3.5)

Error log below

# With gem 'concurrent-ruby', '1.3.5' you get the error below, so pinning to '1.3.4'
#
# bundler: failed to load command: puma (/app-root/vendor/bundle/ruby/3.2.0/bin/puma)
# /app-root/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.8.7/lib/active_support/logger_thread_safe_level.rb:12:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
#
# Logger::Severity.constants.each do |severity|
# ^^^^^^^^^^
Read more
Diary

macOS 15 and later: Keychain Access icon removed from Utilities

1 Mins read

Tried to renew a certificate, but the Keychain Access icon is gone?

macOS Sequoia 15 and later changed how you launch it.

A “Passwords” app is now the main thing displayed, and Keychain Access—which engineers need—seems to have been hidden.

The underlying data is probably the same, but the Passwords app is a simplified interface for usability.

How to access it

Hit Command + Space to open Spotlight and type “key”—the icon will show up.

Apple’s official docs cover this too.

Read more