about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/application.rb2
-rw-r--r--config/initializers/timeout.rb2
-rw-r--r--config/locales/en.yml2
-rw-r--r--config/navigation.rb1
-rw-r--r--config/routes.rb16
5 files changed, 20 insertions, 3 deletions
diff --git a/config/application.rb b/config/application.rb
index d44835957..8da5ade3c 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -34,7 +34,7 @@ module Mastodon
       allow do
         origins  '*'
 
-        resource '/api/*',       headers: :any, methods: [:post, :put, :delete, :get, :options], credentials: false
+        resource '/api/*',       headers: :any, methods: [:post, :put, :delete, :get, :options], credentials: false, expose: ['Link', 'X-RateLimit-Reset', 'X-RateLimit-Limit', 'X-RateLimit-Remaining', 'X-Request-Id']
         resource '/oauth/token', headers: :any, methods: [:post], credentials: false
       end
     end
diff --git a/config/initializers/timeout.rb b/config/initializers/timeout.rb
index 643780884..06a29492e 100644
--- a/config/initializers/timeout.rb
+++ b/config/initializers/timeout.rb
@@ -1,4 +1,4 @@
 if Rails.env.production?
-  Rack::Timeout.service_timeout = 15
+  Rack::Timeout.service_timeout = 90
   Rack::Timeout::Logger.disable
 end
diff --git a/config/locales/en.yml b/config/locales/en.yml
index c6c7c236e..e7d39327e 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -118,6 +118,8 @@ en:
     disable: Disable
     enable: Enable
     instructions_html: "<strong>Scan this QR code into Google Authenticator or a similiar app on your phone</strong>. From now on, that app will generate tokens that you will have to enter when logging in."
+    plaintext_secret_html: "Plain-text secret: <samp>%{secret}</samp>"
+    warning: If you cannot configure an authenticator app right now, you should click "disable" or you won't be able to login.
   users:
     invalid_email: The e-mail address is invalid
     invalid_otp_token: Invalid two-factor code
diff --git a/config/navigation.rb b/config/navigation.rb
index b2930f62f..0d43a9f73 100644
--- a/config/navigation.rb
+++ b/config/navigation.rb
@@ -13,6 +13,7 @@ SimpleNavigation::Configuration.run do |navigation|
     end
 
     primary.item :admin, safe_join([fa_icon('cogs fw'), 'Administration']), admin_accounts_url, if: proc { current_user.admin? } do |admin|
+      admin.item :reports, safe_join([fa_icon('flag fw'), 'Reports']), admin_reports_url, highlights_on: %r{/admin/reports}
       admin.item :accounts, safe_join([fa_icon('users fw'), 'Accounts']), admin_accounts_url, highlights_on: %r{/admin/accounts}
       admin.item :pubsubhubbubs, safe_join([fa_icon('paper-plane-o fw'), 'PubSubHubbub']), admin_pubsubhubbub_index_url
       admin.item :domain_blocks, safe_join([fa_icon('lock fw'), 'Domain Blocks']), admin_domain_blocks_url
diff --git a/config/routes.rb b/config/routes.rb
index 3da7563fd..70e252409 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -67,9 +67,21 @@ Rails.application.routes.draw do
     resources :domain_blocks, only: [:index, :create]
     resources :settings, only: [:index, :update]
 
-    resources :accounts, only: [:index, :show, :update] do
+    resources :reports, only: [:index, :show] do
       member do
+        post :resolve
+        post :silence
         post :suspend
+        post :remove
+      end
+    end
+
+    resources :accounts, only: [:index, :show] do
+      member do
+        post :silence
+        post :unsilence
+        post :suspend
+        post :unsuspend
       end
     end
   end
@@ -115,6 +127,7 @@ Rails.application.routes.draw do
       resources :apps,       only: [:create]
       resources :blocks,     only: [:index]
       resources :favourites, only: [:index]
+      resources :reports,    only: [:index, :create]
 
       resources :follow_requests, only: [:index] do
         member do
@@ -138,6 +151,7 @@ Rails.application.routes.draw do
 
         member do
           get :statuses
+          get 'statuses/media', to: 'accounts#media_statuses', as: :media_statuses
           get :followers
           get :following