1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'parent/stable-4.3' into upstream-20241005

This commit is contained in:
KMY 2024-10-05 09:02:38 +09:00
commit cc857e57c6
132 changed files with 775 additions and 312 deletions

View file

@ -13,7 +13,7 @@ module WebAppControllerConcern
policy = ContentSecurityPolicy.new
if policy.sso_host.present?
p.form_action policy.sso_host
p.form_action policy.sso_host, -> { "https://#{request.host}/auth/auth/" }
else
p.form_action :none
end

View file

@ -15,7 +15,7 @@ module Settings
end
def create
session[:new_otp_secret] = User.generate_otp_secret(32)
session[:new_otp_secret] = User.generate_otp_secret
redirect_to new_settings_two_factor_authentication_confirmation_path
end

View file

@ -7,7 +7,23 @@ module WellKnown
def show
@webfinger_template = "#{webfinger_url}?resource={uri}"
expires_in 3.days, public: true
render content_type: 'application/xrd+xml', formats: [:xml]
respond_to do |format|
format.any do
render content_type: 'application/xrd+xml', formats: [:xml]
end
format.json do
render json: {
links: [
{
rel: 'lrdd',
template: @webfinger_template,
},
],
}
end
end
end
end
end