CP Weng

Results 13 comments of CP Weng

Same problem. I found it's the order of middlewares cause the bug: ``` py # not working app.add_middleware(CORSMiddleware, allow_origins=['*'], allow_credentials=True, allow_methods=['*'], allow_headers=['*']) app.add_middleware(GZipMiddleware) ``` ``` py # working app.add_middleware(GZipMiddleware) app.add_middleware(CORSMiddleware,...

@DocSavage I think it makes more sense to put middlewares before routers. At least that works for me.

OMG The working code yesterday gets CORS error back today... Changing the order of middlewares is useless

As this [stackoverflow post](http://stackoverflow.com/questions/41077167/raise-attributeerrorname-after-reseiz-an-image-on-python-with-pil) suggest, just change `with Image.open(f) as image:` to `image = Image.open(f)`. It works for me!

@vojtatranta You should take a look at react-router's [huge-apps](https://github.com/reactjs/react-router/tree/master/examples/huge-apps) example. I also use it in my [boilerplate](https://github.com/gocreating/express-react-hmr-boilerplate).

It's 2020 and I still get the same problem

Same problem when using with mdx