Commit Graph

140 Commits

Author SHA1 Message Date
David Lord cbb6c36692
update docs about fallback order 2025-05-12 18:30:27 -07:00
David Lord 4f7156f2c3
configure and check trusted_hosts 2024-11-12 21:01:55 -08:00
David Lord 4995a775df
fix subdomain_matching=False behavior 2024-11-12 08:58:08 -08:00
David Lord e13373f838
enable secret key rotation 2024-11-08 08:09:01 -08:00
David Lord 9efc1ebeeb
add SESSION_COOKIE_PARTITIONED config
co-authored-by: Jose Cespedes <josecespedes@ibm.com>
2024-11-01 16:24:15 -07:00
David Lord c7a53888a1
add config and docs for limits 2024-11-01 13:17:53 -07:00
David Lord 4e6384da32
Merge branch '3.0.x' 2024-08-23 16:34:57 -07:00
pgjones d718ecf6d3 Provide a configuration option to control automatic option responses
By default Flask will provide responses to OPTIONS requests that are
automatically generated. These responses list the valid methods in the
response headers. Whilst this is useful, it can be frowned on by
auditors hence an ability to disable it wholesale is useful.
2024-06-07 19:04:18 +00:00
Éloi Rivard 4a1766c252
document caveats on SESSION_COOKIE_DOMAIN
Changing this value might result in browsers with several competing session cookies. In
that situation there is no guarantee of which one will be sent first, and be used as the
session cookie.
2024-05-25 10:23:44 -07:00
Jeroendevr 0f477df86a
Config from Data Files to match from_file API
In the API docs using a TOML file to load config is referred to as https://flask.palletsprojects.com/en/2.3.x/api/#flask.Config.from_file

To keep docs consistent a small change to the config docs.
2023-05-24 11:13:36 +02:00
David Lord c24f8c8199
no cookie domain by default 2023-04-12 12:38:22 -07:00
David Lord 6650764e97
remove previously deprecated code 2023-02-23 08:35:16 -08:00
David Lord 24df8fc89d
show 'run --debug' in docs
Reverts commit 4d69165ab6. Now that a
release has this option, it's ok to show it in the docs. It had been
reverted because the 2.2.x docs showed it before 2.2.3 was released.
2023-02-15 14:33:32 -08:00
David Lord 4d69165ab6
revert run debug docs 2022-12-29 09:51:34 -08:00
Grey Li bd26928fdb
Prefer flask run --debug in docs 2022-12-24 15:24:49 -07:00
Abdur-Rahmaan Janhangeer d951a763fb
Fix backstick not rendering. 2022-11-27 13:51:09 +04:00
David Lord a0458efef6
refactor or remove old docs (#4748) 2022-08-05 11:28:22 -07:00
David Lord 30427a2090
remove FLASK_ENV from docs 2022-08-01 15:11:35 -07:00
David Lord 69f9845ef2
add json provider interface 2022-07-13 07:42:52 -07:00
David Lord 84c722044a
new debug/test preserve context implementation 2022-07-01 12:01:44 -07:00
David Lord ab1fbef29a
prefer --app over FLASK_APP in docs 2022-06-17 09:26:26 -07:00
David Lord e75d575361
windows env vars are uppercase 2022-03-25 12:07:45 -07:00
David Lord 4eb5e9455b
more from_prefixed_env features
* support nested dict access with "__" separator
* don't specify separator in prefix
* catch exceptions for any loads function
2022-03-25 11:54:45 -07:00
pgjones 08a283af5e
Allow loading of environment variables into the config
This new method will pick out any environment variables with a certain
prefix and place them into the config named without the prefix. This
makes it easy to use environment variables to configure the app as is
now more popular than when Flask started.

The prefix should ensure that the environment isn't polluted and the
config isn't polluted by environment variables.

I've followed the dynaconf convention of trying to parse the
environment variable and then falling back to the raw value if parsing
fails.
2022-03-25 11:54:03 -07:00
otherJL0 afe77feef3
Adding Fish commands to docs 2022-01-14 08:26:50 -08:00
Ryan Nevius 225ff3ea6c Fix example `SECRET_KEY` generation code
Removes the extra `)` in: `print(secrets.token_hex())`
2021-10-18 10:41:39 +02:00
Kevin Kirsche 58a08a1d73
use secrets instead of os.urandom 2021-10-13 08:12:51 -07:00
David Lord dc11cdb4a4
move send_file and send_from_directory to Werkzeug
The implementations were moved to Werkzeug, Flask's functions become
wrappers around Werkzeug to pass some Flask-specific values.

cache_timeout is renamed to max_age. SEND_FILE_MAX_AGE_DEFAULT,
app.send_file_max_age_default, and app.get_send_file_max_age defaults
to None. This tells the browser to use conditional requests rather than
a 12 hour cache.

attachment_filename is renamed to download_name, and is always sent if
a name is known.

Deprecate helpers.safe_join in favor of werkzeug.utils.safe_join.

Removed most of the send_file tests, they're tested in Werkzeug.

In the file upload example, renamed the uploaded_file view to
download_file to avoid a common source of confusion.
2020-11-05 09:27:52 -08:00
Grey Li 1035efc7d6
Add command switch tabs for Bash, CMD and Powershell with sphinx-tabs (#3714)
* Enable Sphinx extension sphinx-tabs

* Add command tabs for all export commands

* Add command tabs for all venv commands

Fix trim spaces
2020-10-15 14:08:37 -07:00
Leonardo Giordani 2254adf845 Simplified version of file-based database 2020-06-23 15:14:03 +01:00
Leonardo Giordani 26ec470afb Fixed trailing whitespace 2020-06-23 15:06:37 +01:00
Leonardo Giordani efbd721f20 Changed example DATABASE_URI values 2020-06-23 14:56:51 +01:00
Leonardo Giordani aec07a1cb5 Removed misleading DEBUG variable from examples 2020-06-21 09:29:45 +01:00
David Lord 171aabc87d
remove unused ref directives
replace page refs with doc directives
2020-04-04 12:57:14 -07:00
David Lord 2ae740dd49
f-strings everywhere 2020-04-04 12:10:00 -07:00
David Lord 7673835b3d
remove Python 2 from docs 2020-04-04 12:05:44 -07:00
David Lord aac0f585b9
clean up config.from_file docs 2019-10-18 09:24:58 -07:00
pgjones 829aa65e64
Support loading configuration from text files
TOML is a very popular format now, and is taking hold in the Python
ecosystem via pyproject.toml (among others). This allows toml config
files via,

    app.config.from_file("config.toml", toml.loads)

it also allows for any other file format whereby there is a loader
that takes a string and returns a mapping.
2019-10-18 09:15:47 -07:00
David Lord df470aecb9
use app.name as app.logger name 2019-07-01 14:56:18 -07:00
Paul Butler a3272941ce Clarify documentation about how url_for uses configuration values (#2759) 2019-05-31 15:33:06 -04:00
David Lord 2236ba980c
Merge branch '1.0.x' 2019-05-16 12:18:36 -07:00
A Brooks 4e272fc042
Fix various small spelling errors. 2019-05-16 11:50:10 -07:00
jordan bonser 800c744fe7
improve env vars config example 2019-05-16 08:48:34 -07:00
Martin Michlmayr 7b88b35747
Fix typos in the documentation 2019-02-24 10:40:23 +00:00
David Lord ac6746d1be
Merge branch '1.0-maintenance' 2019-01-06 15:46:33 -08:00
garenchan 5409606c3b
Docs: fix some typos in config.rst 2019-01-06 14:45:10 -08:00
Douglas Thor 830c77cb44
document that Config.from_object uses object as-is 2019-01-06 14:34:05 -08:00
Aditya f05625eb82 Use https for external links wherever possible 2018-10-27 17:58:45 +05:30
Grey Li 21b0aa6dd8 Add prefix for all commands in documentation (#2877)
* Add prefix for commands in docs

* Add prefix for commands in example's README
2018-09-09 17:41:56 +09:00
Vik 9394c389bf
Update config.rst
Fix Debug Default: By default Debug is only True when ENV is 'development'
2018-04-27 10:17:43 -07:00