File tree 1 file changed +5
-5
lines changed
examples/with-flask/with-thirdpartyemailpassword
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
import os
2
2
3
3
from dotenv import load_dotenv
4
- from flask import Flask , g , jsonify
4
+ from flask import Flask , abort , g , jsonify
5
5
from flask_cors import CORS
6
6
from supertokens_python import (InputAppInfo , SupertokensConfig ,
7
7
get_all_cors_headers , init )
@@ -105,10 +105,10 @@ def get_session_info():
105
105
106
106
# This is required since if this is not there, then OPTIONS requests for
107
107
# the APIs exposed by the supertokens' Middleware will return a 404
108
- @app .route ("/" , defaults = {"path" : "" }) # type: ignore
109
- @app .route (" /<path:path>" ) # type: ignore
110
- def index ( _ : str ):
111
- return ''
108
+ @app .route ('/' , defaults = {'u_path' : '' }) # type: ignore
109
+ @app .route (' /<path:u_path>' ) # type: ignore
110
+ def catch_all ( u_path : str ): # pylint: disable=unused-argument
111
+ abort ( 404 )
112
112
113
113
114
114
if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments