mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user