-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base64 encoding occurs for application/javascript #55
Comments
That does seem odd. Even though I'm fine with adding the mime-type, but I'd like to see a simple reproduction case in order to find the actual root cause. Could you help out by providing a simple configuration that reproduces the error? Thanks! As a side note, serving assets should ideally happen through S3/CloudFront rather than the Lambda function itself |
Appreciate the feedback, sorry for the delayed response, was just working on this over the weekend and have been busy. I've started with this as a base for a simple flask based serverless application which works fine. I've then replaced the requirements.txt, app.py and serverless.yml to support flask-restplus which is a REST framework for flask that provides swagger-ui built in, so these js files are built within this package: http://flask-restplus.readthedocs.io/en/stable/ I've attached a zip that contains the requirements, app.py to support flask-restplus, as well as the updated serverless.yml. Let me know if this helps, or if I can provide anything further from the project. |
Don't worry, I haven't had time to look into this yet myself. Thanks for the attached files, I'll try to reproduce it. |
After testing this, as far as I can tell, there is some special handling of |
I'm not sure if/how I'm getting this behavior but unless I've added this mime type (application/javascript) here:
https://github.com/logandk/serverless-wsgi/blob/master/wsgi.py#L16
All of my javascript files loading in are base64 encoded and break rendering. I've adding this mime type and everything is fixed. This seems like a bug unless I'm overlooking something in configuration.
The text was updated successfully, but these errors were encountered: