Похожие чаты

Hey Can we use http & https both at same time

in flask ?

9 ответов

35 просмотров
CHRS- Автор вопроса
Malware ( DM = BLOCK )
yeah

how 🤔.. i try via decorator.. but its show connection reset

CHRS
how 🤔.. i try via decorator.. but its show connect...

acc to first search result of google: https://stackoverflow.com/questions/18962418/https-with-http-in-flask-python

CHRS- Автор вопроса
Malware ( DM = BLOCK )
acc to first search result of google: https://sta...

suppose i want to run an endpoint only on https /admin -> https /dashboard -> http

CHRS
suppose i want to run an endpoint only on https /...

i got this from some random website : from flask import Flask, redirect, request, url_for app = Flask(name) @app.route('/admin', methods=['GET']) def admin(): if request.is_secure: # The request is already using HTTPS, so proceed with handling the endpoint. return 'Admin Page (HTTPS)' else: # Redirect the request to the HTTPS version of the endpoint. return redirect(url_for('admin', _scheme='https', _external=True)) @app.route('/dashboard', methods=['GET']) def dashboard(): if request.is_secure: # Redirect the request to the HTTP version of the endpoint. return redirect(url_for('dashboard', _scheme='http', _external=True)) else: # The request is already using HTTP, so proceed with handling the endpoint. return 'Dashboard Page (HTTP)' if name == 'main': app.run(port=5000)

CHRS- Автор вопроса
Malware ( DM = BLOCK )
i got this from some random website : from flas...

i think same.. means we just need to make decorator .. and filter the stuff 😱😱

Malware ( DM = BLOCK )
i got this from some random website : from flas...

To post more than a few lines of code, use a pastebin like: * dpaste.org * linkode.org * bin.kv2.dev * hastebin.com If you are stuck in a terminal, you can use ix.io or paste.rs to paste from the CLI: <command to print output> |& curl -F 'f:1=<-' ix.io <command to print output> |& curl --data-binary @- https://paste.rs

Malware ( DM = BLOCK )
i got this from some random website : from flas...

Also, try making a habit of including your sources in your replies

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта