Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Kehl committed Feb 6, 2025
1 parent 515419e commit afd3d94
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def init_app(application):
application.before_request(load_organization_before_request)
application.before_request(request_helper.check_proxy_header_before_request)
application.before_request(make_session_permanent)
application.before_request(block_serving_node_files)
application.after_request(save_service_or_org_after_request)

start = len(asset_fingerprinter._filesystem_path)
Expand Down Expand Up @@ -372,11 +373,6 @@ def record_start_time():
g.start = monotonic()
g.endpoint = request.endpoint

@application.before_request
def block_serving_node_files():
if "node_modules" in request.path:
abort(403)

@application.context_processor
def inject_global_template_variables():
return {
Expand Down Expand Up @@ -409,6 +405,11 @@ def make_session_permanent():
session.permanent = True


def block_serving_node_files():
if "node_modules" in request.path:
abort(403)


def create_beta_url(url):
url_created = None
try:
Expand Down

0 comments on commit afd3d94

Please sign in to comment.