Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Response #70

Open
burnt-melon opened this issue Jan 25, 2021 · 3 comments
Open

Invalid Response #70

burnt-melon opened this issue Jan 25, 2021 · 3 comments

Comments

@burnt-melon
Copy link

burnt-melon commented Jan 25, 2021

Hello,
I am currently trying to open the webpage that's hosting my flask script but whenever I try opening the link google (and every other browser) just said

"This site cant provide a secure connection,
127.0.0.1 sent an invalid response.
ERR_SSL_PROTOCOL_ERROR"
and whenever I look back at my terminal it says

"
127.0.0.1 - - [25/Jan/2021 15:59:16] code 400, message Bad request version
"

and a bunch of UTF-8 encoded things which im not gonna show since it may be confidential (And it also has unknown characters so I cant decode).
I am sure that talisman is causing this because when I remove the Talisman(app) it works perfectly fine but when I do add it, the same error occurs until I remove it and restart my laptop.
My script:
`
from flask import Flask

from flask import render_template

from flask_talisman import Talisman

app = Flask(name)

Talisman(app)

@app.route('/')

def index():
return render_template("index.html")

if name == "main":
app.run(debug=True)

`

@kennethleungty
Copy link

Having the same issue. Did you manage to find a solution?

@anders-kiaer
Copy link

My guess is you have a localhost server you try to access over https://, but that would fail (unless you configure SSL for your localhost server). You could try to explicitly ask your browser to access the localhost server on http:// and set the force_https=False argument in Talisman while developing on localhost.

Note also that it looks like this project have been forked and is more actively maintained over there (#78).

@kennethleungty
Copy link

Thanks alot Anders, placing force_https=False did work. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants