I have a flask app and I want to send a request with Ajax from my page to another website on the internet( http://hihihi.com/v1/user_likes...for example and this App not flask and I can't change or add any code in the hihihi App). I set a cookie in my Ajax requests but blocked by the browser. how can I fix this?
Back end flask:
@app.route('/tr')
def test():
return render_template('tr.html')
And in tr.html file as shown as I set header Ajax:
$.ajax({
url: 'http://hihihi.com/api',
type: 'POST',
contentType: 'application/json',headers:{'Cookie' : 'sdfsdfsdfsfdszfvgzzf'}
datatype: 'json',
})
.done(function(data) {
.
.
.
Refused to set unsafe header "Cookie" Error:
In addition, I use this link but not work for me.