Search Posts

Category: cross-domain

Tainted canvas, crossOrigin Anonymous

I’m using a service on angularjs in order to resize an image before I send it to server. The service uses a javascript canvas. At first I got this error : “angular.js:14110 Error: Failed to execute ‘toDataURL’ on ‘HTMLCanvasElement’: Tainted canvases may not be exported. at Object.resizeImageWidthHeight” So I set crossorigin attribute on the img element before sending it to resizing service: chosenImage = document.getElementById(‘img-full’); chosenImage.crossOrigin =”Anonymous”; Now I get a new error:” ccess to […]

HTML colour picker in windows

Html colour (input type = “colour”) picker shows user the bottom pen icon to get the colour from dom.It works in mac but it doesn’t show up in windows. is there a way to show that option in windows as well if not,what are some good options we have(javascript/ angular 1 library) to pick colour from a image in the html. I found this https://www.script-tutorials.com/creating-an-html5-canvas-image-color-picker/, but it shows cross origin issues with tainted canvas. any […]

Cross Origin Post Request Angular js

I’m trying to make a post request using Angular js, but it doesn’t work. The origin url is different from server. The server is a Node Express app and its base url is “localhost:3000”. Client is a java web app running on a Tomcat server, and its base url is “localhost:8080”. My server has the following files: app.js: var createError = require(‘http-errors’); var express = require(‘express’); var path = require(‘path’); var cookieParser = require(‘cookie-parser’); var […]

No ‘Access-Control-Allow-Origin’ header is present on the requested resource with Spring Boot and Angular JS [duplicate]

This question already has an answer here: How to enable CORS in AngularJs 4 answers I have written and angular js program where I am doing a get Request and trying to fetch a resource from a spring Boot rest service. But I am getting this error : No ‘Access-Control-Allow-Origin’ header is present on the requested resource In Angular Js : ctrl.js (function(){ “use strict”; angular.module(“app”) .controller(“chatCtrl”,function($scope,$http){ $scope.name = “ujjawal”; $scope.usermessages = []; $scope.botmessages = […]

AngularJS $http request issue in HTTP and HTTPS

I have a problem in my angularjs $http request. When I send request to the API it was blocked by the browser like: ERROR IN FIREFOX : Blocked loading mixed active content “http://www.example.com/rest/default/V1/integration/admin/token/” ERROR IN CHROME: Mixed Content: The page at ‘https://www.example.com/load.shtml#/register/pos/docs/2323232221555/new‘ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://www.example.com/rest/default/V1/integration/admin/token/‘. This request has been blocked; the content must be served over HTTPS. How can I fixed this problem? Any idea is accepted. […]