Похожие чаты

Hey Can we use http & https both at same time

in flask ?

9 ответов

23 просмотра
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

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

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

#include <stdio.h> #include <stdlib.h> #include <time.h> void mass_first_generate(int mass[5][7]) {     for (int N = 0; N < 5; N++) {         for (int A = 0; A < 7; A++) {   ...
Чувак
6
https://www.linkedin.com/posts/ugama-benedicta-kelechi-codergirl-103041300_mobiledevelopment-fluttertraining-handsonlearning-activity-7263445699227254784-IdHB?utm_source=share...
CoderGirl
16
Всем привет! Имеется функция: function IsValidChar(ch: UTF8Char): Boolean; var i: Integer; ValidChars: AnsiString; begin ValidChars := 'abcdefghijklmnopqrstuvwxyzABCDE...
Евгений
44
VIP-397 BNBx Oracle implementation upgrade Summary This proposal, if approved, will upgrade the implementation of the BNBx Oracle contract on Venus from version 1 (V1) to v...
Venus Announcements
2
Ну вот просто даже давайте вот как. Какой нибудь конкретный кейс, можете в пример привести, где бч работает и приносит прикладную пользу, а не просто что бы было? Не крипту.
Alexander Andreev
22
For all those that keep asking why no pump? why this ? and why that...? Please close ur ewt chart and open 2 others - TOTAL (total mc) and BTC.D (btc dominance). Maybe BTC a...
Inn3r_G
19
"Since pnut can flip FTM easily, I'm swapping my FTM to pnut and hoping for a easy x5-x10" Perfect recipe for disaster. NFA but chances are, you'll end up as exit liquidity ...
C. A.
7
объясните пожалуйста, почему функция не работает должным образом? вроде должно брать активное окно сравнивать его размер с размером экрана, и если есть совпадение = true прове...
JF
12
Ready for some fun AND a chance to win TKO Tokens? Join us for exciting minigames in our Telegram group! 🕒 Don’t miss out—games start on today 25 October 2024, at 8 PM! Ge...
Milkyway | Tokocrypto
255
AMD status update? No longer in the plan but something might be around the corner later on Chinese partner? No longer in the plan. This market does not seem to be the top ...
Ben
6
Карта сайта