Closed tofias closed 9 years ago
Might have gotten too ambitious, but once I started configing I could not be confining.
I think the redirects stuff isn't in the scope of this PR. Can we remove that for now? Let's revisit it in another issue or PR.
Yup.
You'd be able to fake that now with SSL_SKIPS if you included just a '/' to be skipped.
Hey, what was the format() thing?
Okay, so is that what you meant?
Sorry for the lengthy review :)
What if we change the naming convention to SSLIFY_XXX and use the set default method?
Hm. I'm not too keen on a library mucking around with the app config as it may have unintended consequences and the end-user may not be aware that it's occurring. It still seems a lot more straightforward to continue using the arguments and to not introduce app.config settings. It's a lot more consistent with how the library currently works.
I looked at Flask-SQLAlchemy and copied the setdefault method. Was so proud, but you're the boss
Ehhh. I'd still be craving for those sexy/clean create_app functions. And really, how many people do you imagine could be using Flask-SSSLify and SSLIFY_XXX in config in someway that does not lineup (almost) exactly with what is going on on here? And this paves the way for something similar with app.testing as well when you get around to it.
Let me take a look at some other libraries to see if this is a consistent pattern.
Seems like a reasonable pattern, based on some other modules. Just need the updated docs and I think we're good to go.
👍
I've tested locally and everything is working well. Merging in.
Cool. And thanks for making my first experience contributing to an Open Source project so positive.
I'm not too keen on a library mucking around with the app config as it may have unintended consequences
e.g. if the app argument is in fact a flask blueprint, which used to work in 0.1.4 and now gives
AttributeError: 'Blueprint' object has no attribute 'config'
My humble attempt to address Issue #25.