FGF-College-Work / Forum

:beer: Espaço dedicado a discussões e tira dúvida sobre disciplinas e conteúdo tecnológico.
MIT License
13 stars 4 forks source link

CORS : Access-Control-Allow-Origin #124

Open marcialwushu opened 5 years ago

marcialwushu commented 5 years ago

Access to XMLHttpRequest at '' from origin 'http://localhost:8100' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple values ', ', but only one is allowed.

ERROR HttpErrorResponse {headers: HttpHeaders, status: 0, statusText: "Unknown Error", url: null, ok: false, …}
marcialwushu commented 5 years ago

https://stackoverflow.com/questions/35432749/disable-web-security-in-chrome-48

It working for me. Try using this..it will help you out..


c:\Program Files\Google\Chrome\Application>chrome.exe --disable-web-security --user-data-dir="D:\chrome"
marcialwushu commented 5 years ago

https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en

Allow-Control-Allow-Origin: * Offered by: vitvad

Chrome Plugin

marcialwushu commented 5 years ago

https://forum.ionicframework.com/t/http-post-request-error-no-access-control-origin-in-ionic/106029

https://noobfornoob.wordpress.com/2017/11/23/angular5-ionic-3-httpclient-cors-issue-solution/

marcialwushu commented 5 years ago

SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) { /** fn = ƒ (valor), value = {access_token: "6xE63aN-fHVDqgIBq76mZq3fGzC6aL8n-vOO6rCRPYFuy7gDzg…EHmNeEXtdC0IvKmVyR1LbAySbv8Ha8TldBGiIOg_QSG4YoAtA", token_type: "bearer", expires_in: 2591999} */

        try {
            fn.call(this._context, value); /** fn = ƒ (valor), value = {access_token: "6xE63aN-fHVDqgIBq76mZq3fGzC6aL8n-vOO6rCRPYFuy7gDzg…EHmNeEXtdC0IvKmVyR1LbAySbv8Ha8TldBGiIOg_QSG4YoAtA", token_type: "bearer", expires_in: 2591999}
 */
        }
        catch (err) {
            this.unsubscribe();
            throw err;
        }
    };
marcialwushu commented 5 years ago
_parentSubscriber = Subscriber {closed: false, _parent: null, _parents: null, _subscriptions: Array(1), syncErrorValue: null, …}
marcialwushu commented 5 years ago


polyfills.js:2 [Violation] 'submit' handler took 45645ms
polyfills.js:3 [Violation] 'readystatechange' handler took 1282ms
polyfills.js:3 [Violation] 'readystatechange' handler took 1749ms
polyfills.js:3 [Violation] 'readystatechange' handler took 2530ms
polyfills.js:2 [Violation] 'load' handler took 3343ms
5
[Violation] 'setTimeout' handler took <N>ms
keyboard.js:140 [Violation] 'setTimeout' handler took 5013ms
dom-controller.js:77 [Violation] 'setTimeout' handler took 2186ms
dom-controller.js:77 [Violation] 'setTimeout' handler took 1375ms
keyboard.js:143 [Violation] 'setTimeout' handler took 6878ms
[Violation] 'setTimeout' handler took 19756ms
5
[Violation] 'requestAnimationFrame' handler took <N>ms
animation.js:291 [Violation] 'requestAnimationFrame' handler took 1229ms
dom-controller.js:100 [Violation] 'requestAnimationFrame' handler took 1128ms
[Violation] 'requestAnimationFrame' handler took 14043ms
[Violation] 'requestAnimationFrame' handler took 82888ms
dom-controller.js:100 [Violation] 'requestAnimationFrame' handler took 408ms
platform.js:607 [Violation] 'transitionend' handler took 4826ms
scroll-view.js:76 [Violation] 'scroll' handler took 2674ms
marcialwushu commented 5 years ago

https://github.com/hapijs/discuss/issues/451

https://enable-cors.org/server_iis7.html

https://docs.microsoft.com/pt-br/aspnet/core/security/cors?view=aspnetcore-2.1

https://www.joshmorony.com/dealing-with-cors-cross-origin-resource-sharing-in-ionic-applications/

http://desenvolvimentoweb.ninja/ionic/como-lidar-com-cors-em-ionic/

marcialwushu commented 5 years ago
<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />