Directory Browsing is Enabled for Static file path in Apache2 config that ships with NetBox #10189

Closed
opened 2025-12-29 21:28:02 +01:00 by adam · 2 comments
Owner

Originally created by @marsteel on GitHub (Sep 5, 2024).

Originally assigned to: @marsteel on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.1.0

Python Version

3.10

Steps to Reproduce

  1. access URL/static
  2. static files are browseable

Root cause:

Indexes is enabled for /static in
684cdda8f4/contrib/apache.conf (L23)

    <Directory /opt/netbox/netbox/static>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Require all granted
    </Directory>

Suggestion:

Remove Indexes so Directory Browsing is disabled for static file path.

Expected Behavior

  1. access URL/static
  2. static files are hidden
    Forbidden You don't have permission to access this resource.

Observed Behavior

static files are browseable

Originally created by @marsteel on GitHub (Sep 5, 2024). Originally assigned to: @marsteel on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.1.0 ### Python Version 3.10 ### Steps to Reproduce 1. access URL/static 2. static files are browseable Root cause: Indexes is enabled for /static in https://github.com/netbox-community/netbox/blob/684cdda8f4dcf408b462b8b632446f4b5df7fb67/contrib/apache.conf#L23 ``` <Directory /opt/netbox/netbox/static> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory> ``` Suggestion: Remove Indexes so Directory Browsing is disabled for static file path. ### Expected Behavior 1. access URL/static 2. static files are hidden `Forbidden You don't have permission to access this resource.` ### Observed Behavior static files are browseable
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:28:02 +01:00
adam closed this issue 2025-12-29 21:28:02 +01:00
Author
Owner

@arthanson commented on GitHub (Sep 5, 2024):

@marsteel do you want to submit a PR to change this?

@arthanson commented on GitHub (Sep 5, 2024): @marsteel do you want to submit a PR to change this?
Author
Owner

@marsteel commented on GitHub (Sep 6, 2024):

@arthanson sure, I will submit a PR. Please assign the issue to me.

@marsteel commented on GitHub (Sep 6, 2024): @arthanson sure, I will submit a PR. Please assign the issue to me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10189