[ https://jira.fiware.org/browse/HELP-13450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez updated HELP-13450: ---------------------------------- Description: Created question in FIWARE Q/A platform on 30-01-2018 at 14:01 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/48523162/fiware-error-access-control-allow-origin +Question:+ Fiware error: Access-Control-Allow-Origin +Description:+ I'm making a call to the contextBroker and it gives me this error. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 405. >From postman or from freeboard I do not get any of this. getContextBroker(){ console.log("Consumimos el servicio getContextBroker"); let headers = new Headers ({'Accept': 'application/json', 'Fiware-Service': 'x', 'Fiware-ServicePath': '/x', 'Access-Control-Allow-Origin': '*'}); let options = new RequestOptions ({headers : headers}); return this._http.get(this.urlcontextBrokers, {headers : headers}).map(res => res.json()); } } how can I solve that? I've tried adding: 'Access-Control-Allow-Origin': '*' But it still does not work was: Created question in FIWARE Q/A platform on 30-01-2018 at 14:01 {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/48523162/fiware-error-access-control-allow-origin +Question:+ Fiware error: Access-Control-Allow-Origin +Description:+ I'm making a call to the contextBroker and it gives me this error. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 405. >From postman or from freeboard I do not get any of this. getContextBroker(){ console.log("Consumimos el servicio getContextBroker"); let headers = new Headers ({'Accept': 'application/json', 'Fiware-Service': 'x', 'Fiware-ServicePath': '/x', 'Access-Control-Allow-Origin': '*'}); let options = new RequestOptions ({headers : headers}); return this._http.get(this.urlcontextBrokers, {headers : headers}).map(res => res.json()); } } how can I solve that? I've tried adding: 'Access-Control-Allow-Origin': '*' But it still does not work HD-Enabler: Orion > FIWARE.Question.Tech.Fiware error: Access-Control-Allow-Origin. > --------------------------------------------------------------- > > Key: HELP-13450 > URL: https://jira.fiware.org/browse/HELP-13450 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Karaboga, Burak > Labels: fiware, fiware-orion > > Created question in FIWARE Q/A platform on 30-01-2018 at 14:01 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/48523162/fiware-error-access-control-allow-origin > +Question:+ > Fiware error: Access-Control-Allow-Origin > +Description:+ > I'm making a call to the contextBroker and it gives me this error. > Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 405. > From postman or from freeboard I do not get any of this. > getContextBroker(){ > console.log("Consumimos el servicio getContextBroker"); > let headers = new Headers ({'Accept': 'application/json', 'Fiware-Service': 'x', 'Fiware-ServicePath': '/x', 'Access-Control-Allow-Origin': '*'}); > let options = new RequestOptions ({headers : headers}); > return this._http.get(this.urlcontextBrokers, {headers : headers}).map(res => res.json()); > } > } > how can I solve that? > I've tried adding: 'Access-Control-Allow-Origin': '*' > But it still does not work -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy