Forums

403 - Forbidden for HTTPS urls on paid account

Hi,

I have some Flask code that loads external URLs & has been working since 2 months. But, it suddenly stopped working since yesterday.

Requesting HTTP urls work fine. But, not HTTPS. I have a paid account & I tried reloading app multiple times with no luck.

Any ideas of suggestions ?

Thanks Srini

Sample code

import requests from flask import Flask

app = Flask(name)

@app.route('/testget', methods=['GET', 'OPTIONS']) def testGet(): req = requests.Request('GET', 'http://www.ndtv.com') prepared = req.prepare() s = requests.Session() r = s.send(prepared) print "PRINT GET" print r.status_code print r.content

    req = requests.Request('GET', 'https://www.mydoamin.com')
    prepared = req.prepare()
    s = requests.Session()
    r = s.send(prepared)
    print "PRINT *GET 2*"
    print r.status_code
    print r.content
    return "all done"

That site has an invalid cert for https, so requests is failing.

Hi Glenn,

Thanks for the response.

"https://www.mydoamin.com" was a dummy URL I provided in this forum post. The actual site I was trying to load was "https://services.poynt.net/token" and below is the response I get:

<html>#015#012<head><title>403 Forbidden</title></head>#015#012<body bgcolor="white">#015#012<center><h1>403 Forbidden</h1></center>#015#012<hr><center>nginx</center>#015#012</body>#015#012</html>

Appreciate your help.

Regards Srinivas

Ah. That 403 is not generated by anything in our infrastructure, so it must be coming from the site you're trying to access. There's not much we can do about auth problems with external sites.