Apicurio Service Registry Operator fails uploading an artifact from an external URL
Issue
Even after setting the CORS_ALLOWED_ORIGINS env variable on the ApicurioRegistry CR, it fails when I try to upload an artifact from an external domain. The error message seen on Google Chrome's Developer Console is
"Access to fetch at 'https://contenthost:12345/openapi.json' from origin 'http://example-apicurioregistry-kafkasql.apicuriotest.router-default.apps-crc.testing' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled."
I set the ApicurioRegistry CR as specified in this note:
apiVersion: registry.apicur.io/v1
kind: ApicurioRegistry
metadata:
name: example-apicurioregistry-kafkasql
spec:
configuration:
env:
- name: CORS_ALLOWED_ORIGINS
value: https://contenthost:12345
- name: CORS_ALLOWED_HEADERS
value: accept, authorization, content-type, x-requested-with
- name: CORS_ALLOWED_METHODS
value: GET, OPTIONS
kafkasql:
bootstrapServers: my-cluster-kafka-bootstrap.apicuriotest.svc:9092
persistence: kafkasql
Environment
- Apicurio Service Registry 2.6.x
- Openshift 4.x (any compatible version)
- The server certificates should be known to the web browser being used, when fetching the artifact
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.