diff --git a/docs/middleware/access.md b/docs/middleware/access.md index a74f757..9b548c3 100644 --- a/docs/middleware/access.md +++ b/docs/middleware/access.md @@ -29,7 +29,7 @@ Example of access middleware ```yaml routes: - path: /protected - name: Basic auth + name: protected rewrite: / destination: 'https://example.com' methods: [POST, PUT, GET] diff --git a/docs/middleware/basic.md b/docs/middleware/basic.md index efe3267..0bf1bb2 100644 --- a/docs/middleware/basic.md +++ b/docs/middleware/basic.md @@ -9,33 +9,32 @@ nav_order: 3 # Basic Auth Middleware -Access middleware prevents access to a route or specific route path. +Basic-auth middleware protects route paths. -Example of access middleware +Example of basic-auth middleware ```yaml - # The server will return 403 - - name: api-forbidden-paths - type: access - ## prevents access paths +middlewares: + - name: basic-auth + type: basic paths: - - /swagger-ui/* - - /v2/swagger-ui/* - - /api-docs/* - - /internal/* - - /actuator/* + - /admin/* + rule: + username: admin + password: admin + ``` -### Apply access middleware on the route +### Apply basic-auth middleware to the route ```yaml routes: - - path: /protected - name: Basic auth + - path: / + name: Basic-auth rewrite: / - destination: 'https://example.com' + destination: https://example.com methods: [POST, PUT, GET] - healthCheck: + healthCheck: {} cors: {} middlewares: - - api-forbidden-paths + - basic-auth ``` \ No newline at end of file diff --git a/docs/middleware/oauth.md b/docs/middleware/oauth.md index 84d00bb..42cd400 100644 --- a/docs/middleware/oauth.md +++ b/docs/middleware/oauth.md @@ -90,8 +90,8 @@ Example of rateLimit middleware ```yaml ##### Define routes routes: - - name: Basic auth - path: /protected + - path: /protected + name: oauth-route rewrite: / destination: 'https://example.com' methods: [POST, PUT, GET]