Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input {
- http {
- response_headers => {
- "Access-Control-Allow-Origin" => "*"
- "Access-Control-Allow-Headers" => "*"
- "Access-Control-Allow-Methods" => "*"
- "Access-Control-Allow-Credentials" => "*"
- }
- port => 5000
- user => "hi"
- password => "there"
- }
- }
- output {
- elasticsearch {
- hosts => "elasticsearch:9200"
- }
- }
- const headers = new HttpHeaders().append('Access-Control-Allow-Origin', '*');
- this.httpClient.
- post<any>('http://myhost/logstash', {message: 'test'}, { headers: headers, responseType: 'text' as 'json' })
- .subscribe(
- data => console.log(data),
- error => console.log(error));
- headers = headers.append('Authorization', 'Basic ' + btoa('hi:there'));
Add Comment
Please, Sign In to add comment