I created a node js server using express with a route that returns this:
exports.login = (req, res, next) => {
let username = req.query.username;
let password = req.query.password;
client.agent.login(username, password).then(
r => {
client.agent.saveSession('./session');
res.set(GenericHeaders.getGenericHeaders());
res.json("ok");
}
)
.catch(
err => {
res.json(err.toString());
}
);
};
My server.js looks like this:
var PORT = process.env.PORT || 3000;
const express = require('express');
const app = express();
require('./src/Routes/index')(app);
app.use(express.json());
app.listen(PORT);
I have an ionic + angular client making this request:
let params = new HttpParams()
.set('username', user)
.set('password', pass);
this.httpClient.get('https://someprojectname.herokuapp.com/login', { params: params }).subscribe(
res => {
console.log("res")
if (res == "ok") {
this.router.navigateByUrl("/home");
}
else {
this.invalidMessage("wrong user or password");
}
}
)
When I make the request with my client, it gets:
No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
but when I make the same request with postman, it shows the "Access-Control-Allow-Origin" header.
I’m not sure what i’m doing wrong.
The security is not the focus of this question, i’ll be looking to it later.
zithromax z-pak – buy generic azithromycin 250mg generic azithromycin 250mg
sildenafil generic 5mg – best viagra tablet viagra tablets over the counter
online cialis 20mg – cialis online discount ordering cialis online
stromectol tablet 3 mg – ivermectin 90 mg stromectol pills canada
slot games – casino slot games online casino no deposit bonus
ed pills near me – erectile dysfunction drugs top rated ed pills
generic prednisone 40mg online – buy prednisone online without prescription how can i get prednisone
where can i get viagra without a prescription – where can i buy generic viagra in canada online sildenafil 100 mg
cialis 40 mg price – Buy cialis without a prescription prices for cialis
ivermectin uk – buy ivermectin uk ivermectin 9 mg
cure ed – male dysfunction pills erectile dysfunction
cost of ventolin in usa – ventolin inhaler ventolin online
prednisone drug – generic prednisone prednisone tablets 5mg price
how to get cytotec online – can you get cytotec over the counter purchase cytotec online
ivermectin 6mg – ivermectin 2 stromectol tablets buy online
buy tadalafil online safely – tadalafil 5 mg purchase tadalafil
canadian viagra online – Cialis express delivery cialis daily
kamagra gold 100mg online – vidalista 40mg fildena 120mg
xenical uk – orlistxen.com orlistat medication
ivermectin tablets for sale walmart – stromectol cost uk ivermectin cost in usa
generic viagra from canada online – viagra on line sildenafil 2.5 mg
canadian pharmacy viagra prices – best generic viagra buy viagra europe
where to buy ivermectin for humans – ivermectin order ivermectin 12 mg
sildalis brand – sildalis online metformin 500mg price
cost hydroxychloroquine – plaquenil 400mg brand cheap hydroxychloroquine 400mg
676868 982153Cause thats required valuable affiliate business rules to get you started on participating in circumstances appropriate for your incredible web-based business concern. Inernet marketing 931968
viagra 100mg pill – buy viagra 50mg tadalafil 5mg pills
viagra sans ordonnance – cialis 20mg generique pas cher generique tadalafil 40mg
price of stromectol – stromectol 6mg sale stromectol liquid
where to get tadalafil tadalafil online
order prednisone sale – order prednisone 40mg pills cheap prednisone
purchase doxycycline online – oral synthroid buy synthroid 100mcg without prescription
tadalafil liquid https://cialisicp.com/
tadalafil online with out prescription side effects for tadalafil
tetracycline 250mg cheap – baclofen 25mg pills buy celexa 20mg
purchase cialis pill – buy ivermectin 12 mg online ivermectin 200mg
tadalafil order online no prescription where to buy generic cialis online safely
tadalafil order online no prescription canada generic tadalafil
cialis without prescription where to buy generic cialis online safely
where to order tadalafil tablets cialis at canadian pharmacy
tadalafil generic where to buy generic cialis online safely
tadalafil brands buy tadalis
generic cialis tadalafil what is tadalafil
http://www.ivermectinoge.com/ generic ivermectin 6mg
stromectol online stromectol 3mg tablets buy stromectol 6mg
https://www.ivermectinusd.com/ generic ivermectin 12 mg
generic stromectol 12mg