gerbermichi opened a new issue, #36459:
URL: https://github.com/apache/superset/issues/36459

   ### Bug description
   
   I use the following code to set the correct locale:
   
   ```
   def set_locale_from_url_param():
       from flask import session, request
       locale_param = request.args.get('lang')
       if locale_param:
           supported_locales = ['de', 'fr']
           if locale_param in supported_locales:
               session["locale"] = locale_param
   
   FLASK_APP_MUTATOR = lambda app: app.before_request(set_locale_from_url_param)
   ````
   
   That works fine, however, the call to `language_pack/<lang>/` is 
unauthorized because the guest token is not set yet.
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.9
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to