apiVersion: apisix.apache.org/v2 kind: ApisixRoute metadata: name: myawesomeapi namespace: poc-go-api spec: http: - name: poc-back-app_rules match: hosts: - demo-api.demo.jpgouin.pro paths: - /* backends: - serviceName: poc-go-apisvc servicePort: 80 plugins: - name: cors enable: true config: allow_credential: true allow_origins: "**" allow_origins_by_regex: [".*.demo.jpgouin.pro"] allow_methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS expose_headers: X-PINGOTHER, Content-Type, Authorization allow_headers: X-PINGOTHER, Content-Type, Authorization - name: authz-keycloak enable: true config: token_endpoint: https://keycloak.192.168.59.106.nip.io/realms/companyA/protocol/openid-connect/token #permissions: ["View authors resources#authors:GET"] http_method_as_scope: true lazy_load_paths: true client_id: poc-apisix audience: poc-apisix client_secret: 1CMTnvgyt2dGIrcU8DbzBsa5vTwNWp44 discovery: https://keycloak.192.168.59.106.nip.io/realms/companyA/.well-known/uma2-configuration realm: companyA ssl_verify: false