I have a problem with getting data from my node.js server.
The client side is:
public getTestLines() : Observable {
let hea
This has nothing to do with the client. Very simply you can solve this problem by adding Cors to the Configure method. like this:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
InitializeDatabase(app);
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMiddleware();
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
app.UseCors(s => s.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); ==> This section
app.UseMvc();
}
Now Restart your project and check again.