We have seen some users reporting an issue when trying to download files from an app created thru Flask.
Below is the error that the user gets:
"Unauthorized : you must be authenticated to access this page" .
To resolve this issue, check your code for the below line (this could also be listed under POST action):
form action
The above code can cause problems due to routing/reverse proxy setups, and this can be resolved by following these steps:
Change the "form action" code to one of the following:
<form action="#"> or <form action="">
If you use "/" as shown below, the url prefix for your app will be stripped, and you'll end up sending your request to <base_domain>/ (this will result in the aforementioned authentication error).
<form action="/">
So, removing "/" from POST request should fix this problem.
Comments
0 comments
Please sign in to leave a comment.