Progress
This commit is contained in:
@@ -87,17 +87,27 @@ class Rack::Attack
|
||||
|
||||
API_DELETE_REBLOG_REGEX = /\A\/api\/v1\/statuses\/[\d]+\/unreblog/.freeze
|
||||
API_DELETE_STATUS_REGEX = /\A\/api\/v1\/statuses\/[\d]+/.freeze
|
||||
API_POST_CHAT_MESSAGE_REGEX = /\A\/api\/v1\/chat_messages/.freeze
|
||||
API_POST_FOLLOW_REGEX = /\A\/api\/v1\/accounts\/[\d]+\/follow/.freeze
|
||||
API_POST_GROUP_PASSWORD_CHECK_REGEX = /\A\/api\/v1\/groups\/[\d]+\/password/.freeze
|
||||
|
||||
throttle('throttle_api_delete', limit: 30, period: 30.minutes) do |req|
|
||||
req.authenticated_user_id if (req.post? && req.path =~ API_DELETE_REBLOG_REGEX) || (req.delete? && req.path =~ API_DELETE_STATUS_REGEX)
|
||||
end
|
||||
|
||||
throttle('throttle_api_chat_message', limit: 1000, period: 1.day) do |req|
|
||||
req.authenticated_user_id if req.post? && req.path =~ API_POST_CHAT_MESSAGE_REGEX
|
||||
end
|
||||
|
||||
throttle('throttle_api_follow', limit: 200, period: 1.day) do |req|
|
||||
req.authenticated_user_id if req.post? && req.path =~ API_POST_FOLLOW_REGEX
|
||||
end
|
||||
|
||||
throttle('throttle_group_password_check', limit: 5, period: 1.minute) do |req|
|
||||
req.authenticated_user_id if req.post? && req.path =~ API_POST_GROUP_PASSWORD_CHECK_REGEX
|
||||
end
|
||||
|
||||
throttle('protected_paths', limit: 25, period: 5.minutes) do |req|
|
||||
throttle('protected_paths', limit: 10, period: 5.minutes) do |req|
|
||||
req.remote_ip if req.post? && req.path =~ PROTECTED_PATHS_REGEX
|
||||
end
|
||||
|
||||
|
||||
@@ -1151,6 +1151,7 @@ en:
|
||||
approve: Approve
|
||||
approved_msg: Account has been verified.
|
||||
reject: Reject
|
||||
rejected_msg: Successfully rejected.
|
||||
billing:
|
||||
upgrade:
|
||||
explanation_html: Here you can upgrade to PRO.
|
||||
|
||||
@@ -45,6 +45,7 @@ SimpleNavigation::Configuration.run do |navigation|
|
||||
s.item :promotions, safe_join([fa_icon('star fw'), t('promotions.title')]), settings_promotions_url, if: -> { current_user.admin? }
|
||||
s.item :monthly_funding, safe_join([fa_icon('money fw'), t('monthly_funding.title')]), settings_expenses_url, if: -> { current_user.admin? }
|
||||
s.item :group_categories, safe_join([fa_icon('users fw'), t('group_categories.title')]), settings_group_categories_url, if: -> { current_user.admin? }
|
||||
s.item :trending_hashtags, safe_join([fa_icon('hashtag fw'), 'Trending Hashtags']), settings_trending_hashtags_url, if: -> { current_user.admin? }
|
||||
end
|
||||
|
||||
n.item :logout, safe_join([fa_icon('sign-out fw'), t('auth.logout')]), destroy_user_session_url, link_html: { 'data-method' => 'delete' }
|
||||
|
||||
@@ -53,6 +53,7 @@ Rails.application.routes.draw do
|
||||
resources :promotions, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :expenses, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :group_categories, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
resources :trending_hashtags, only: [:index, :new, :create, :edit, :update, :destroy]
|
||||
|
||||
namespace :verifications do
|
||||
get :moderation, to: 'moderation#index', as: :moderation
|
||||
@@ -144,6 +145,9 @@ Rails.application.routes.draw do
|
||||
resource :action, only: [:new, :create], controller: 'account_actions'
|
||||
resources :statuses, only: [:index, :show, :create, :update, :destroy]
|
||||
resources :followers, only: [:index]
|
||||
resources :joined_groups, only: [:index]
|
||||
resources :chat_conversations, only: [:index]
|
||||
resources :chat_messages, only: [:index, :show, :create, :update, :destroy]
|
||||
|
||||
resource :confirmation, only: [:create] do
|
||||
collection do
|
||||
@@ -165,7 +169,7 @@ Rails.application.routes.draw do
|
||||
|
||||
resources :custom_emojis, only: [:index, :new, :create, :update, :destroy]
|
||||
|
||||
resources :groups, only: [:index, :destroy] do
|
||||
resources :groups, only: [:index, :show, :update, :destroy] do
|
||||
member do
|
||||
post :enable_featured
|
||||
post :disable_featured
|
||||
@@ -233,6 +237,7 @@ Rails.application.routes.draw do
|
||||
post :unblock_messenger
|
||||
post :mute_messenger
|
||||
post :unmute_messenger
|
||||
post :set_expiration_policy
|
||||
end
|
||||
end
|
||||
|
||||
@@ -257,24 +262,20 @@ Rails.application.routes.draw do
|
||||
resources :chat_conversation, only: [:show, :create] do
|
||||
member do
|
||||
post :mark_chat_conversation_approved
|
||||
post :mark_chat_conversation_unread
|
||||
post :mark_chat_conversation_read
|
||||
post :mark_chat_conversation_hidden
|
||||
end
|
||||
end
|
||||
|
||||
resources :links, only: :show
|
||||
resource :popular_links, only: :show
|
||||
resources :streaming, only: [:index]
|
||||
resources :links, only: :show
|
||||
resource :popular_links, only: :show
|
||||
resources :streaming, only: [:index]
|
||||
resources :custom_emojis, only: [:index]
|
||||
resources :suggestions, only: [:index, :destroy]
|
||||
resources :suggestions, only: [:index, :destroy]
|
||||
resources :scheduled_statuses, only: [:index, :show, :update, :destroy]
|
||||
resources :preferences, only: [:index]
|
||||
resources :preferences, only: [:index]
|
||||
resources :group_categories, only: [:index]
|
||||
resources :chat_messages, only: [:create, :destroy]
|
||||
|
||||
get '/search', to: 'search#index', as: :search
|
||||
get '/account_by_username/:username', to: 'account_by_username#show', username: username_regex
|
||||
|
||||
resources :promotions, only: [:index]
|
||||
resources :follows, only: [:create]
|
||||
resources :media, only: [:create, :update]
|
||||
@@ -285,6 +286,11 @@ Rails.application.routes.draw do
|
||||
resources :filters, only: [:index, :create, :show, :update, :destroy]
|
||||
resources :shortcuts, only: [:index, :create, :show, :destroy]
|
||||
resources :bookmarks, only: [:index]
|
||||
resources :bookmark_collections, only: [:index, :create, :update, :show, :destroy]
|
||||
resources :albums, only: [:index, :create, :update, :show, :destroy]
|
||||
|
||||
get '/search', to: 'search#index', as: :search
|
||||
get '/account_by_username/:username', to: 'account_by_username#show', username: username_regex
|
||||
|
||||
namespace :apps do
|
||||
get :verify_credentials, to: 'credentials#show'
|
||||
|
||||
@@ -22,6 +22,11 @@ defaults: &defaults
|
||||
noindex: false
|
||||
theme: 'default'
|
||||
aggregate_reblogs: true
|
||||
chat_messages:
|
||||
restrict_non_followers: true
|
||||
show_active: false
|
||||
read_receipts: false
|
||||
sounds: true
|
||||
notification_emails:
|
||||
follow: false
|
||||
reblog: false
|
||||
|
||||
Reference in New Issue
Block a user