Rails 6 forces you to whitelist what domain names an application
may be accessed from. while it is possible to supply a regular
expression, it is not clear how to do this when mastodon parses the
environment variable you supply the regex from. meanwhile, disabling
whitelisting entirely DOES work
this is theoretically less secure; if we can find a way to supply a
regex, that would be preferable.
--- yr cat
config.hosts << web_host if web_host.present?
config.hosts.concat(alternate_domains) if alternate_domains.present?
config.host_authorization = { exclude: ->(request) { request.path == '/health' } }
+
+ # actually, don't whitelist at all
+ # it may be possible to use regexes in ALTERNATE_DOMAINS but it seems not to work
+ # ---yr cat
+ config.hosts.clear
end
end