mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Stop using application/x-javascript as a mime type and use the RFC-compliant application/javascript instead. Fixes #4261
This commit is contained in:
parent
020d9bb018
commit
4b421550d3
@ -18,3 +18,4 @@ Bug fixes
|
||||
| `Bug #4218 <https://redmine.postgresql.org/issues/4218>`_ - Properly assign dropdownParent in Select2 controls.
|
||||
| `Bug #4219 <https://redmine.postgresql.org/issues/4219>`_ - Ensure popper.js is installed when needed.
|
||||
| `Bug #4246 <https://redmine.postgresql.org/issues/4246>`_ - Fixed console error when subnode control is used in panels.
|
||||
| `Bug #4261 <https://redmine.postgresql.org/issues/4261>`_ - Stop using application/x-javascript as a mime type and use the RFC-compliant application/javascript instead.
|
@ -623,14 +623,14 @@ def utils():
|
||||
pg_libpq_version=pg_libpq_version,
|
||||
support_ssh_tunnel=config.SUPPORT_SSH_TUNNEL
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'})
|
||||
200, {'Content-Type': 'application/javascript'})
|
||||
|
||||
|
||||
@blueprint.route("/js/endpoints.js")
|
||||
def exposed_urls():
|
||||
return make_response(
|
||||
render_template('browser/js/endpoints.js'),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
|
||||
@ -639,7 +639,7 @@ def exposed_urls():
|
||||
def error_js():
|
||||
return make_response(
|
||||
render_template('browser/js/error.js', _=gettext),
|
||||
200, {'Content-Type': 'application/x-javascript'})
|
||||
200, {'Content-Type': 'application/javascript'})
|
||||
|
||||
|
||||
@blueprint.route("/js/node.js")
|
||||
@ -659,14 +659,14 @@ def node_js():
|
||||
edbas_help_path=edbas_help_path,
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'})
|
||||
200, {'Content-Type': 'application/javascript'})
|
||||
|
||||
|
||||
@blueprint.route("/js/messages.js")
|
||||
def messages_js():
|
||||
return make_response(
|
||||
render_template('browser/js/messages.js', _=gettext),
|
||||
200, {'Content-Type': 'application/x-javascript'})
|
||||
200, {'Content-Type': 'application/javascript'})
|
||||
|
||||
|
||||
@blueprint.route("/js/collection.js")
|
||||
@ -674,7 +674,7 @@ def messages_js():
|
||||
def collection_js():
|
||||
return make_response(
|
||||
render_template('browser/js/collection.js', _=gettext),
|
||||
200, {'Content-Type': 'application/x-javascript'})
|
||||
200, {'Content-Type': 'application/javascript'})
|
||||
|
||||
|
||||
@blueprint.route("/browser.css")
|
||||
|
@ -930,7 +930,7 @@ class ServerNode(PGChildNodeView):
|
||||
"servers/supported_servers.js",
|
||||
server_types=ServerType.types()
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def connect_status(self, gid, sid):
|
||||
|
@ -206,7 +206,7 @@ class ForeignServerView(PGChildNodeView):
|
||||
"foreign_servers/js/foreign_servers.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -223,7 +223,7 @@ class UserMappingView(PGChildNodeView):
|
||||
"user_mappings/js/user_mappings.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -255,7 +255,7 @@ class DomainView(PGChildNodeView, DataTypeReader):
|
||||
"domains/js/domains.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -328,7 +328,7 @@ class ForeignTableView(PGChildNodeView, DataTypeReader):
|
||||
"foreign_tables/js/foreign_tables.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -224,7 +224,7 @@ class FtsConfigurationView(PGChildNodeView):
|
||||
"fts_configuration/js/fts_configuration.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -212,7 +212,7 @@ class FtsDictionaryView(PGChildNodeView):
|
||||
"fts_dictionary/js/fts_dictionary.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -207,7 +207,7 @@ class FtsTemplateView(PGChildNodeView):
|
||||
"fts_template/js/fts_templates.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -313,7 +313,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):
|
||||
"function/js/functions.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
@ -1686,7 +1686,7 @@ class ProcedureView(FunctionView):
|
||||
"procedure/js/procedures.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
|
||||
@ -1797,7 +1797,7 @@ class TriggerFunctionView(FunctionView):
|
||||
"trigger_function/js/trigger_functions.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
|
||||
|
@ -121,7 +121,7 @@ class PackageView(PGChildNodeView):
|
||||
"package/js/package.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(action=None):
|
||||
|
@ -201,7 +201,7 @@ class EdbFuncView(PGChildNodeView, DataTypeReader):
|
||||
"edbfunc/js/edbfunc.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
@ -709,7 +709,7 @@ class EdbProcView(EdbFuncView):
|
||||
"edbproc/js/edbproc.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
|
||||
|
@ -175,7 +175,7 @@ class EdbVarView(PGChildNodeView, DataTypeReader):
|
||||
"edbvar/js/edbvar.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -126,7 +126,7 @@ class SequenceView(PGChildNodeView):
|
||||
"sequence/js/sequence.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(action=None):
|
||||
|
@ -149,5 +149,5 @@ def module_js():
|
||||
for n in ConstraintRegistry.registry
|
||||
]
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
@ -196,7 +196,7 @@ class CheckConstraintView(PGChildNodeView):
|
||||
"check_constraint/js/check_constraint.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -223,7 +223,7 @@ class ExclusionConstraintView(PGChildNodeView):
|
||||
"exclusion_constraint/js/exclusion_constraint.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -233,7 +233,7 @@ class ForeignKeyConstraintView(PGChildNodeView):
|
||||
"foreign_key/js/foreign_key.js",
|
||||
_=_
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -245,7 +245,7 @@ class IndexConstraintView(PGChildNodeView):
|
||||
node_type=self.node_type,
|
||||
node_label=self.node_label
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -188,7 +188,7 @@ class RuleView(PGChildNodeView):
|
||||
"rules/js/rules.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -219,7 +219,7 @@ class ResourceGroupView(NodeView):
|
||||
"resource_groups/js/resource_groups.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -105,7 +105,7 @@ class TablespaceView(PGChildNodeView):
|
||||
"tablespaces/js/tablespaces.js",
|
||||
_=gettext
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def check_precondition(f):
|
||||
|
@ -298,7 +298,7 @@ class NodeView(with_metaclass(MethodViewType, View)):
|
||||
flask.render_template(
|
||||
"{0}/js/{0}.js".format(self.node_type)
|
||||
),
|
||||
200, {'Content-Type': 'application/x-javascript'}
|
||||
200, {'Content-Type': 'application/javascript'}
|
||||
)
|
||||
|
||||
def children(self, *args, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user