Skip to main content

IN-004 — Web Store SSL Settings

FieldValue
PriorityInfrastructure
CategoryInfrastructure
Gap itemWeb Store SSL Settings
DescriptionSSL enabled flag per web store
Documentation statusDocumented
Code locationrr_web_store.ssl_enabled / URL builders
Assigned to
  • docs/infrastructure/IN-004-WEB-STORE-SSL-SETTINGS.md

Documentation

This topic was added to Developer Docs and is shown here so the team can review the documented coverage for this gap in one place.


Developer Docs — docs/infrastructure/IN-004-WEB-STORE-SSL-SETTINGS.md

IN-004 — Web Store SSL Settings

Overview

The web store supports both HTTP and HTTPS storefront URLs. Whether a store generates secure (https://) or non-secure (http://) URLs is controlled by the ssl_enabled flag stored in the database.

important

This setting only controls how application URLs are generated. It does not install, renew, or manage SSL certificates on the web server.

For host-level certificates (Zone / Apache), see IN-001 SSL Certificates (Production) and IN-001 SSL (Staging).


Database Configuration

PropertyValue
Tablerr_web_store
Columnssl_enabled
Data TypeBOOLEAN
Default Valuefalse

Behavior

ssl_enabledGenerated Base URL
truehttps://{domain}
falsehttp://{domain}

Example

If the store domain is:

web.rahvaraamat.ee

Then:

ssl_enabledGenerated URL
truehttps://web.rahvaraamat.ee
falsehttp://web.rahvaraamat.ee

Configuration Source

The value is configured during web store initialization using the Yii console command:

php yii web-store/init

During initialization, the setup prompts:

Is SSL enabled for the domain?

The administrator selects:

  • Yesssl_enabled = true
  • Nossl_enabled = false

The selected value is then stored in the rr_web_store.ssl_enabled column.


Administration

There is currently no Admin Panel interface for modifying this setting.

To change the SSL behavior:

  1. Re-run the initialization command, or
  2. Update the ssl_enabled value directly in the database.

Application Usage

The ssl_enabled flag is referenced throughout the application whenever storefront URLs are generated.

Primary usages include:

  • Main Web Store URL generation
  • External URL generation
  • Wishlist URL generation
  • Redirect URL creation
  • Legacy URL builder compatibility
  • Wishlist serialization

Key application components include:

  • MainWebStoreUrlManager
  • ExternalUrlHelper
  • OldUrlBuilder
  • Wishlist Serializer

What This Setting Controls

The ssl_enabled flag determines:

  • Protocol used for storefront URLs (http vs https)
  • Generated redirect URLs
  • Wishlist links
  • External links generated by the application
  • Base URL construction

What This Setting Does NOT Control

This flag does not perform any server-side SSL management.

It does not:

  • Install SSL certificates
  • Renew SSL certificates
  • Configure Apache or Nginx
  • Configure HTTPS redirects
  • Enable HSTS
  • Manage TLS versions
  • Configure certificate chains
  • Validate certificate expiry

These responsibilities belong to the hosting/server infrastructure (for example, Zone Hosting, Apache, Nginx, or a load balancer).


Technical Flow

rr_web_store.ssl_enabled


Read by URL Builder Classes


Protocol Selection

true ─────► https://domain
false ────► http://domain


Generated Store URLs

Notes

  • The application assumes that the hosting environment has already been configured correctly for HTTPS.
  • If ssl_enabled is set to true but the web server does not have a valid SSL certificate, generated HTTPS URLs may not be accessible.
  • Likewise, if the server supports HTTPS but ssl_enabled remains false, the application will continue generating HTTP links.

Summary

FeatureSupported
Generate HTTPS URLs
Generate HTTP URLs
Controlled by Database
Configurable via web-store/init
Editable from Admin Panel
Installs SSL Certificates
Renews SSL Certificates
Configures Web Server SSL