Linked Questions
40 questions linked to/from How to proxy API requests to another server?
19
votes
4
answers
62k
views
angular proxy configuration for development and production
when I import HttpClient to call my own written node.js API, there are some issues with the settings of the URL.
for example:
import { HttpClient, HttpHeaders } from '@angular/common/http';
export ...
7
votes
3
answers
36k
views
How to run Angular app on xampp server?
I'm working with Angular 2 with php. Before I started PHP with Angular 2. I have done Angular 2 with node.js on server localhost:3000. Now with PHP, how I can configure my Angular 2 app with xampp ...
20
votes
2
answers
62k
views
How to make CORS-enabled HTTP requests in Angular 2?
The error is the following:
XMLHttpRequest cannot load http://some_url.herokuapp.com/api/some_api/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://...
10
votes
6
answers
16k
views
Angular HttpClient doesn't send POST, it sends OPTIONS
Im' newbie using Angular HttpClient (and writting english too)
I have a problem, I'm trying sending HTTP request with POST method in order to negociate OAuth token obtenction but angular sends ...
17
votes
3
answers
20k
views
Configure port for HTTP in Angular.io
I want to create an angular.io application, but the rest API shall be delivered from a different server port.
Angular content from localhost:4200, the data from a node express server started ...
16
votes
4
answers
50k
views
Angular - Connects to Proxy server and gets response but then shows Error occured while trying to proxy to: localhost to actual server
I'm new to Angular(2,4). I was trying to connect to proxy server.
Added proxy.config.json in project root directory
{
"/api/*": {
"target": "http://<server_ip_address>:<port>...
3
votes
1
answer
5k
views
Angular 4 http patch not working with call but works with postman
I am trying to make a patch/and post call to the server but it never gets to the server. I have tried doing this with postman and it works there. so I'm pretty sure its something with my code.
...
0
votes
1
answer
17k
views
localhost:4200 has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
I am calling 2 GitHub API's but i am getting above error when I am printing the response in the console. I googled the error and tried fixing it by creating proxy.json file and modifying package.json ...
1
vote
1
answer
8k
views
Configure Angular-cli proxy for custom headers in request to backend?
the topic, as I understand it is quite fresh and relevant.
Tell me where is my mistake?
So, I did everything as in the documentation:
https://github.com/angular/angular-cli/blob/master/docs/...
2
votes
1
answer
8k
views
How to enable CORS when sending http post request from Angular2 app
When I tried to send http request, I got this error about CORS.
XMLHttpRequest cannot load 'sever-domain'.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-...
2
votes
3
answers
5k
views
CORS issues when doing redirection from .net core web api
Error: Access to XMLHttpRequest at
'http://somedevserver.com/SomePage?id=abc' (redirected from
'https://localhost:44359/api/Verification/signin') from origin
'http://localhost:4200' has been blocked ...
4
votes
1
answer
4k
views
How to make a multiple proxy in angular
So I have two different apis and each one has to be running in the background so in the proxy I have to add both of them.
This is how I currently have it
{
"/api/*":{
"target":&...
2
votes
1
answer
3k
views
How can I get my app (running via ng serve) to connect to a Node back-end while preserving the auto-reload functionality?
I've just migrated my application to Angular CLI. I already have my REST API Node server up and running. I would like to be able to run my front-end with ng serve, to have the auto-reload feature ...
0
votes
1
answer
4k
views
Angular 4 configure a proxy for multiple domains
I have added a proxy for a domain in the following way using Angular4,
/admin/rest/v1.0/pays/pay?sort=regTimeStamp,desc
And i have created the proxy.config.json in the root of the project folder.
{
...
3
votes
1
answer
3k
views
Generate Server Side session using Angular 5 (REST Webservices)
I'm working on Angular-5 and Spring framework.
In spring framework we are making webservices using RESTEG and in Angular. I'm calling webservices from Angular-5 services.
Now problem is angular is ...