Support cross-origin request (CORS) for API
🧩 Problems to solve
We would like to call the Code Suggestions API from a web document with the origin of different domain, i.e. from front-end applications (XMLHttpRequest or Fetch APIs) to https://codesuggestions.gitlab.com/v1
.
flowchart LR
classDef subgraph_padding fill:none,stroke:none
subgraph private k8s
subgraph 1 [ ]
ingress(Nginx Ingress)
mg(Model Gateway)
end
end
web(web document<br>abc.com) -. request .-> ingress
ingress --> mg
class 1 subgraph_padding
💡 Proposal
- Configure Nginx Ingress to allow CORS request
- Validate with setup in production K8s clusters
📒 References
Edited by Tan Le