“wie man Kors in Winkel repariert” Code-Antworten

wie man Kors in Winkel repariert

in PHP server:
    header('Access-Control-Allow-Origin: *');
    header('Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT');
    header('Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Accept-Encoding, X-Auth-Token, content-type');

in Angular POST request:
	const httpOptions = {
 	 	headers: new HttpHeaders()
	}

    httpOptions.headers.append('Access-Control-Allow-Origin', '*');
    httpOptions.headers.append('Content-Type', 'application/json');
    httpOptions.headers.append('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');

	this.httpClient.post(<url>, <body>, httpOptions);
Nickton

Angular CORS -Ausgabe

header('Access-Control-Allow-Origin: *');
Ashamed Ant

CORS in Angular hinzufügen

"architect": {
    "serve": {
            "builder": "@angular-devkit/build-angular:dev-server",
            "options": {
                "browserTarget": "project-name:build",
                "proxyConfig": "src/proxy.conf.json"
            },
          }
}
Quaint Quail

Ähnliche Antworten wie “wie man Kors in Winkel repariert”

Fragen ähnlich wie “wie man Kors in Winkel repariert”

Weitere verwandte Antworten zu “wie man Kors in Winkel repariert” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen