Special case for settings in rewrite is not needed
This commit is contained in:
parent
11e814055e
commit
54fb58a941
|
@ -5,7 +5,6 @@ class Travis::Api::App
|
|||
class Rewrite < Middleware
|
||||
FORMAT = %r(\.(json|xml|png|txt|atom|svg)$)
|
||||
V1_REPO_URL = %r(^(/[^/]+/[^/]+(?:/builds(?:/[\d]+)?|/cc)?)$)
|
||||
SETTINGS_URL = %r(^/settings)
|
||||
|
||||
helpers :accept
|
||||
|
||||
|
@ -38,7 +37,7 @@ class Travis::Api::App
|
|||
end
|
||||
|
||||
def redirect_v1_named_repo_path
|
||||
if request.path =~ V1_REPO_URL && request.path !~ SETTINGS_URL
|
||||
if request.path =~ V1_REPO_URL
|
||||
force_redirect("/repositories#{$1}.#{env['travis.format']}")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user