Files
goma-gateway/docs/middleware/basic.md

845 B

title, layout, parent, nav_order
title layout parent nav_order
Basic auth default Middleware 4

Basic Auth Middleware

Basic-auth middleware protects route paths.

Example of basic-auth middleware

middlewares:
  - name: basic-auth
    type: basic
    paths:
      - /admin/*
    rule:
      username: admin
      password: admin

Apply basic-auth middleware to the route

  routes:
    - path: /
      name: Basic-auth
      rewrite: /
      destination: https://example.com
      methods: [POST, PUT, GET]
      healthCheck: {}
      cors: {}
      middlewares:
        - basic-auth

Advanced Kubernetes deployment

apiVersion: gomaproj.github.io/v1beta1
kind: Middleware
metadata:
  name: basic-middleware-sample
spec:
    type: basic
    paths:
      - /admin/*
    rule:
      username: admin
      password: admin