✨ Add allow disabling `redirect_slashes` at the FastAPI app level
diff --git a/fastapi/applications.py b/fastapi/applications.py
index 298aca921d70c..9b161c5ec832f 100644
--- a/fastapi/applications.py
+++ b/fastapi/applications.py
@@ -62,6 +62,7 @@ def __init__(
         servers: Optional[List[Dict[str, Union[str, Any]]]] = None,
         dependencies: Optional[Sequence[Depends]] = None,
         default_response_class: Type[Response] = Default(JSONResponse),
+        redirect_slashes: bool = True,
         docs_url: Optional[str] = "/docs",
         redoc_url: Optional[str] = "/redoc",
         swagger_ui_oauth2_redirect_url: Optional[str] = "/docs/oauth2-redirect",
@@ -127,6 +128,7 @@ def __init__(
         self.dependency_overrides: Dict[Callable[..., Any], Callable[..., Any]] = {}
         self.router: routing.APIRouter = routing.APIRouter(
             routes=routes,
+            redirect_slashes=redirect_slashes,
             dependency_overrides_provider=self,
             on_startup=on_startup,
             on_shutdown=on_shutdown,
diff --git a/tests/test_router_redirect_slashes.py b/tests/test_router_redirect_slashes.py
new file mode 100644
index 0000000000000..086665c040ab4
--- /dev/null
+++ b/tests/test_router_redirect_slashes.py
@@ -0,0 +1,40 @@
+from fastapi import APIRouter, FastAPI
+from fastapi.testclient import TestClient
+
+
+def test_redirect_slashes_enabled():
+    app = FastAPI()
+    router = APIRouter()
+
+    @router.get("/hello/")
+    def hello_page() -> str:
+        return "Hello, World!"
+
+    app.include_router(router)
+
+    client = TestClient(app)
+
+    response = client.get("/hello/", follow_redirects=False)
+    assert response.status_code == 200
+
+    response = client.get("/hello", follow_redirects=False)
+    assert response.status_code == 307
+
+
+def test_redirect_slashes_disabled():
+    app = FastAPI(redirect_slashes=False)
+    router = APIRouter()
+
+    @router.get("/hello/")
+    def hello_page() -> str:
+        return "Hello, World!"
+
+    app.include_router(router)
+
+    client = TestClient(app)
+
+    response = client.get("/hello/", follow_redirects=False)
+    assert response.status_code == 200
+
+    response = client.get("/hello", follow_redirects=False)
+    assert response.status_code == 404

Right now `redirect_slashes` parameter in sub routers created with `APIRouter` ignored, because only main router's `redirect_slashes` inside FastAPI class is taken into account. FastAPI class creates new router without `redirect_slashes` argument and that's why router always uses default value `redirect_slashes=True` and always redirects on trailing slashes.
https://github.com/tiangolo/fastapi/blob/master/fastapi/applications.py#L69

Here is how to reproduce this problem
```python
from fastapi import FastAPI
from fastapi.routing import APIRouter

router = APIRouter(redirect_slashes=False)

@router.get('/hello/')
def hello_page() -> str:
    return 'Hello, World!'

app = FastAPI()
app.include_router(router)
```

And if you request page `http://127.0.0.1:8080/hello` (without trailing slash) you will be redirected even with `redirect_slashes=False`

```bash
uvicorn main:app
INFO:     Started server process [96046]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     127.0.0.1:57330 - "GET /hello HTTP/1.1" 307 Temporary Redirect
INFO:     127.0.0.1:57330 - "GET /hello/ HTTP/1.1" 200 OK
```

I added `redirect_slashes` to `__init__` method of FastAPI class and passed it to router's constructor.
That way I can change trailing slashes redirect behaviour globally for application instance.