This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib/tasks
Martin Brennan 9a72a0945f
FIX: Ensure CORS rules exist for S3 using rake task (#14802)
This commit introduces a new s3:ensure_cors_rules rake task
that is run as a prerequisite to s3:upload_assets. This rake
task calls out to the S3CorsRulesets class to ensure that
the 3 relevant sets of CORS rules are applied, depending on
site settings:

* assets
* direct S3 backups
* direct S3 uploads

This works for both Global S3 settings and Database S3 settings
(the latter set directly via SiteSetting).

As it is, only one rule can be applied, which is generally
the assets rule as it is called first. This commit changes
the ensure_cors! method to be able to apply new rules as
well as the existing ones.

This commit also slightly changes the existing rules to cover
direct S3 uploads via uppy, especially multipart, which requires
some more headers.
2021-11-08 09:16:38 +10:00
..
add_topic_to_quotes.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
admin.rake DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
annotate.rake DEV: Add annotate rake tasks, and enforce via GitHub actions 2021-07-06 10:11:06 +01:00
api.rake FEATURE: Hash API keys in the database (#8438) 2019-12-12 11:45:00 +00:00
assets.rake DEV: Remove yarn install during assets:precompile (#14166) 2021-08-26 19:14:50 +01:00
auto_annotate_models.rake DEV: Allow annotations to work in symlinked plugins, add binstub (#13635) 2021-07-05 15:43:10 +01:00
autospec.rake DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
avatars.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
backfill.thor DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
bookmarks.rake DEV: Ignore bookmarks.topic_id column and remove references to it in code (#14289) 2021-09-15 10:16:54 +10:00
build_test_topic.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
build.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
categories.rake FIX: rake categories:move_topics shouldn't move category description topic (#14797) 2021-11-03 11:27:51 +08:00
cdn.rake DEV: Fix rubocop issues (#14715) 2021-10-27 11:39:28 +03:00
db.rake DEV: Add rake task to check that the DB can be accessed (#14300) 2021-09-09 14:42:10 -05:00
destroy.rake REFACTOR: Cleanup rake tasks based on feedback 2019-07-18 19:15:01 -06:00
dev.rake DEV: move discourse_dev gem to the core. (#13360) 2021-06-14 20:34:44 +05:30
docker.rake DEV: Specify target browsers when running Ember CLI tests from the docker rake task (#14720) 2021-10-26 11:10:22 -03:00
emails.rake DEV: Report message-id, skip reason in rake email:test (#13674) 2021-07-09 11:14:18 -07:00
emoji.rake DEV: Fix rubocop issues (#14715) 2021-10-27 11:39:28 +03:00
export.rake FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
groups.rake Make rubocop happy. 2019-05-13 09:55:44 +08:00
i18n.rake DEV: Update i18n:check rake task to detect invalid Markdown links (#13728) 2021-07-14 13:26:12 +02:00
images.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
import.rake FEATURE: Add last visit indication to topic view page. (#13471) 2021-07-05 14:17:31 +08:00
incoming_emails.rake FEATURE: Remove attachments and truncate raw field for incoming emails (#8253) 2019-10-30 16:54:35 +11:00
integration.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
javascript.rake DEV: uses forked Mousetrap to avoid leaking listeners (#14198) 2021-09-08 14:48:13 +02:00
log.rake FIX: whoops, linting 2020-09-03 12:10:11 +01:00
maxminddb.rake FIX: maxminddb:get task no longer working 2019-10-04 09:47:33 +10:00
plugin.rake DEV: log rake plugin:update_all plugin_path on error (#12100) 2021-02-16 11:50:27 -08:00
populate.rake FEATURE: Add post edits count to user activity (#13495) 2021-08-02 10:15:53 -04:00
populate.thor DEV: prevents populate task to crash (#8111) 2019-09-22 05:18:48 -07:00
posts.rake FIX: Support Ruby 3 keyword arguments 2021-10-05 11:25:00 -04:00
qunit.rake DEV: Allow Ember CLI for rake qunit:test and rake plugin:qunit 2021-09-21 18:10:04 +01:00
redis.rake DEV: s/\$redis/Discourse\.redis (#8431) 2019-12-03 10:05:53 +01:00
release_note.rake DEV: Update Plugin Release Notes heading format (#14218) 2021-09-02 11:08:31 +08:00
rspec.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
s3.rake FIX: Ensure CORS rules exist for S3 using rake task (#14802) 2021-11-08 09:16:38 +10:00
scheduler.rake FIX: DistributedMutex (#7953) 2019-08-01 09:12:05 +01:00
search.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
site_settings.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
site.rake FIX: Make site tasks work with duplicated uploads (#13972) 2021-08-18 15:57:31 +03:00
smoke_test.rake DEV: Move chrome binary check into a shared lib (#13451) 2021-06-21 13:28:48 +10:00
svg_icons.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
tags.rake FEATURE: Support append when bulk tagging via rake (#9978) 2020-06-04 09:33:48 -04:00
themes.rake DEV: Fix rubocop issues (#14715) 2021-10-27 11:39:28 +03:00
topics.rake FEATURE: Add support for secure media (#7888) 2019-11-18 11:25:42 +10:00
turbo.rake DEV: Add a verbose option to ./bin/turbo_rspec 2019-06-27 15:49:21 +01:00
typepad.thor FIX: use allowlist and blocklist terminology (#10209) 2020-07-27 10:23:54 +10:00
uploads.rake FIX: fix error message for fix_missing_s3 rake task (#13661) 2021-07-07 19:59:03 +05:30
users.rake DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00