JavaScript
Aus wiki
check if array contain
if (data.roles.indexOf('Tenant') !== -1) {
$scope.tenantRole = true;
console.log('Tenant gefunden');
} else {
console.log('Tenant nicht gefunden');
}
CORS
Options Request
Types of CORS requests Cross-origin requests come in two flavors: simple requests "not-so-simple requests" (a term I just made up) Simple requests are requests that meet the following criteria: HTTP Method matches (case-sensitive) one of: HEAD GET POST HTTP Headers matches (case-insensitive): Accept Accept-Language Content-Language Last-Event-ID Content-Type, but only if the value is one of: application/x-www-form-urlencoded multipart/form-data text/plain