Save html format if iOS client header is present

This commit is contained in:
Eugene Burmakin 2025-09-21 14:00:24 +02:00
parent 20c2bc34cd
commit 69cae258c9

View file

@ -67,6 +67,9 @@ class ApplicationController < ActionController::Base
return unless request.headers['X-Dawarich-Client'] return unless request.headers['X-Dawarich-Client']
session[:dawarich_client] = request.headers['X-Dawarich-Client'] session[:dawarich_client] = request.headers['X-Dawarich-Client']
# Force HTML format for iOS clients to ensure proper authentication flow
request.format = :html if request.headers['X-Dawarich-Client'] == 'ios'
end end
def user_not_authorized def user_not_authorized