Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Automatically Serving Static index.html Files #4057

Merged
merged 3 commits into from
May 27, 2023

Conversation

axelstudios
Copy link
Member

@axelstudios axelstudios commented May 23, 2023

What's this PR do?

  1. Prevents automatically serving /static/**/index.html files
  2. Treats every /static/** file, except for js/css/svg, as binary files

How should this be manually tested?

  1. Browse to /static/node_modules/angular-dragula/ and make sure the dragula readme page doesn't appear (403 error)
  2. Browse to /static/node_modules/angular-dragula/index.html and make sure the file downloads rather than rendering and loading js files that we don't want executing
  3. Monkey test, make sure the app itself still works as expected and that images load and such

What are the relevant tickets?

#4039

@axelstudios axelstudios requested a review from kflemin May 23, 2023 01:31
@axelstudios axelstudios changed the title Prevent Automatically Serving Static index.html Files Prevent Automatically Serving Static index.html Files May 23, 2023
Copy link
Contributor

@kflemin kflemin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@axelstudios axelstudios merged commit 2701857 into develop May 27, 2023
7 checks passed
@axelstudios axelstudios deleted the bugfix/4039-wava-static-index.html branch May 27, 2023 01:41
dhaley pushed a commit that referenced this pull request Jul 21, 2023
* Prevent automatically serving index.html files in the static directory

* Treat all static files as binaries except css/js/svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants