mirror of
https://github.com/wahyd4/links.git
synced 2026-08-10 21:56:08 +10:00
Skip auth for /public endpoints
This commit is contained in:
@@ -112,6 +112,11 @@ metadata:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/auth-url: "https://id.junv.cc/oauth2/auth"
|
||||
nginx.ingress.kubernetes.io/auth-signin: "https://id.junv.cc/oauth2/start?rd=https%3A%2F%2F$host$request_uri"
|
||||
# Skip authentication for /public
|
||||
nginx.ingress.kubernetes.io/auth-snippet: |
|
||||
if ($request_uri ~ "/public") {
|
||||
return 200;
|
||||
}
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
@@ -139,6 +144,33 @@ spec:
|
||||
name: links
|
||||
port:
|
||||
number: 80
|
||||
---
|
||||
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: links-public-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
kubernetes.io/tls-acme: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
tls:
|
||||
- hosts:
|
||||
- go.junv.cc
|
||||
secretName: links-tls
|
||||
rules:
|
||||
- host: go.junv.cc
|
||||
http:
|
||||
paths:
|
||||
- path: /public
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: links
|
||||
port:
|
||||
number: 80
|
||||
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user