fix: Include aes_iv in cache key and fix subdomain parsing for cloud mode
1. license.rb: Add aes_iv to Redis cache key to prevent CipherError after
container restart. New random IVs after restart were causing stale cache
decryption failures.
2. action_controller.rb:
- Use request.subdomains.first instead of .last to correctly parse shop
code from tenant.fc.smartsales.asia domains
- Add localhost bypass (127.0.0.1 / ::1) for Docker health checks in
cloud mode, returning 200 OK instead of 404 not_found
Refs: infra-fix-2026-05-06
This commit is contained in:
@@ -32,7 +32,7 @@ class License
|
||||
aes_key, aes_iv = aes.export_to_file(lookup)
|
||||
|
||||
##Check from local redis - if available load local otherwise get from remote
|
||||
cache_key = "#{lookup}:license:#{aes_key}:hostname"
|
||||
cache_key = "#{lookup}:license:#{aes_key}:#{aes_iv}:hostname"
|
||||
|
||||
cache_license = nil
|
||||
|
||||
|
||||
Reference in New Issue
Block a user