(supplied but empty) and if it wasn't supplied at all. re-add `*` to cors parsing if trimmed cors-allow-origin is empty * Re-add `*` when no cors origins are supplied + fix tests test properly by validating that the value returned is the proper modify template to properly enable only if the whole block is enabled ![]() use string instead of basic string to avoid reparsing in template.go * Remove automatic `*` fonctionality from incorrect origins * support single-level wildcard subdomains + tests * add support for optional port mapping on origin * modify documentation for cors and remove dangling comment * add TrimSpace and length validation before adding a new origin properly escape regex using "QuoteMeta" add origin validation in cors ingress annotations * Modify tests and add some logic for origin validation * fix "should enable cors test" looking at improper values * add tests + use search to identify '*' origin add buildOriginRegex function in nginx.tmpl ![]() bump cluster version for `make dev-env` * Add Initial support for multiple cors origins in nginx # Tell client that this pre-flight info is valid for 20 daysĪdd_header 'Access-Control-Max-Age' 1728000 Īdd_header 'Content-Type' 'text/plain charset=UTF-8' # Custom headers and headers various browsers *should* be OK with but aren't ![]() # Catch all incase there's a request method we're not dealing with properlyĪdd_header 'Access-Control-Allow-Origin' "$http_origin" Īdd_header 'Access-Control-Allow-Credentials' 'true' Īdd_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' Īdd_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type' ServiceName: ui-svc servicePort: 8080 path: / ui. secretName: stand01-06-example-com-crt-fullchain rules: Kubernetes.io/ingress.class: "nginx " cert-manager.io/cluster-issuer: "letsencrypt-prod " /configuration-snippet: | if ($http_origin ~* "^https?://((?: name: ui-https-cors-ing spec: ApiVersion: /v1beta1 kind: Ingress metadata:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |