We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GET on /v1/admin returns 404
The expected address for built-in admin plugin is `/v1/admin/`. But if you forget the trailing slash and type `/v1/admin` you get a 404. I think it would be better to raise a 307.

Related to #112 and #858.

```
> http get localhost:8888/v1/admin/
HTTP/1.1 200 OK
(...)

> http get localhost:8888/v1/admin
HTTP/1.1 404 Not Found
(...)
```


GET on /v1/admin returns 404
The expected address for built-in admin plugin is `/v1/admin/`. But if you forget the trailing slash and type `/v1/admin` you get a 404. I think it would be better to raise a 307.

Related to #112 and #858.

```
> http get localhost:8888/v1/admin/
HTTP/1.1 200 OK
(...)

> http get localhost:8888/v1/admin
HTTP/1.1 404 Not Found
(...)
```



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `kinto/plugins/admin/__init__.py`
Content:
```
1 from pyramid.static import static_view
2 
3 
4 def includeme(config):
5     # Process settings to remove storage wording.
6 
7     # Expose capability.
8     config.add_api_capability(
9         "admin",
10         version="1.6.0",
11         description="Serves the admin console.",
12         url="https://github.com/Kinto/kinto-admin/",
13     )
14 
15     build_dir = static_view('kinto.plugins.admin:build', use_subpath=True)
16     config.add_route('catchall_static', '/admin/*subpath')
17     config.add_view(build_dir, route_name="catchall_static")
18
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/kinto/plugins/admin/__init__.py b/kinto/plugins/admin/__init__.py
--- a/kinto/plugins/admin/__init__.py
+++ b/kinto/plugins/admin/__init__.py
@@ -1,4 +1,5 @@
 from pyramid.static import static_view
+from pyramid.httpexceptions import HTTPTemporaryRedirect
 
 
 def includeme(config):
@@ -15,3 +16,10 @@
     build_dir = static_view('kinto.plugins.admin:build', use_subpath=True)
     config.add_route('catchall_static', '/admin/*subpath')
     config.add_view(build_dir, route_name="catchall_static")
+
+    # Setup redirect without trailing slash.
+    def admin_redirect_view(request):
+        raise HTTPTemporaryRedirect(request.path + '/')
+
+    config.add_route('admin_redirect', '/admin')
+    config.add_view(admin_redirect_view, route_name="admin_redirect")

{"golden_diff": "diff --git a/kinto/plugins/admin/__init__.py b/kinto/plugins/admin/__init__.py\n--- a/kinto/plugins/admin/__init__.py\n+++ b/kinto/plugins/admin/__init__.py\n@@ -1,4 +1,5 @@\n from pyramid.static import static_view\n+from pyramid.httpexceptions import HTTPTemporaryRedirect\n \n \n def includeme(config):\n@@ -15,3 +16,10 @@\n     build_dir = static_view('kinto.plugins.admin:build', use_subpath=True)\n     config.add_route('catchall_static', '/admin/*subpath')\n     config.add_view(build_dir, route_name=\"catchall_static\")\n+\n+    # Setup redirect without trailing slash.\n+    def admin_redirect_view(request):\n+        raise HTTPTemporaryRedirect(request.path + '/')\n+\n+    config.add_route('admin_redirect', '/admin')\n+    config.add_view(admin_redirect_view, route_name=\"admin_redirect\")\n", "issue": "GET on /v1/admin returns 404\nThe expected address for built-in admin plugin is `/v1/admin/`. But if you forget the trailing slash and type `/v1/admin` you get a 404. I think it would be better to raise a 307.\r\n\r\nRelated to #112 and #858.\r\n\r\n```\r\n> http get localhost:8888/v1/admin/\r\nHTTP/1.1 200 OK\r\n(...)\r\n\r\n> http get localhost:8888/v1/admin\r\nHTTP/1.1 404 Not Found\r\n(...)\r\n```\r\n\r\n\nGET on /v1/admin returns 404\nThe expected address for built-in admin plugin is `/v1/admin/`. But if you forget the trailing slash and type `/v1/admin` you get a 404. I think it would be better to raise a 307.\r\n\r\nRelated to #112 and #858.\r\n\r\n```\r\n> http get localhost:8888/v1/admin/\r\nHTTP/1.1 200 OK\r\n(...)\r\n\r\n> http get localhost:8888/v1/admin\r\nHTTP/1.1 404 Not Found\r\n(...)\r\n```\r\n\r\n\n", "before_files": [{"content": "from pyramid.static import static_view\n\n\ndef includeme(config):\n    # Process settings to remove storage wording.\n\n    # Expose capability.\n    config.add_api_capability(\n        \"admin\",\n        version=\"1.6.0\",\n        description=\"Serves the admin console.\",\n        url=\"https://github.com/Kinto/kinto-admin/\",\n    )\n\n    build_dir = static_view('kinto.plugins.admin:build', use_subpath=True)\n    config.add_route('catchall_static', '/admin/*subpath')\n    config.add_view(build_dir, route_name=\"catchall_static\")\n", "path": "kinto/plugins/admin/__init__.py"}], "after_files": [{"content": "from pyramid.static import static_view\nfrom pyramid.httpexceptions import HTTPTemporaryRedirect\n\n\ndef includeme(config):\n    # Process settings to remove storage wording.\n\n    # Expose capability.\n    config.add_api_capability(\n        \"admin\",\n        version=\"1.6.0\",\n        description=\"Serves the admin console.\",\n        url=\"https://github.com/Kinto/kinto-admin/\",\n    )\n\n    build_dir = static_view('kinto.plugins.admin:build', use_subpath=True)\n    config.add_route('catchall_static', '/admin/*subpath')\n    config.add_view(build_dir, route_name=\"catchall_static\")\n\n    # Setup redirect without trailing slash.\n    def admin_redirect_view(request):\n        raise HTTPTemporaryRedirect(request.path + '/')\n\n    config.add_route('admin_redirect', '/admin')\n    config.add_view(admin_redirect_view, route_name=\"admin_redirect\")\n", "path": "kinto/plugins/admin/__init__.py"}]}