Skip to content
Snippets Groups Projects
Commit 6945f4a2 authored by Douwe Maan's avatar Douwe Maan
Browse files

Explain `Gitlab::Middleware::Static`.

parent 08874d2b
No related branches found
No related tags found
No related merge requests found
begin begin
app = Rails.application app = Rails.application
   
# The `ActionDispatch::Static` middleware intercepts requests for static files
# by checking if they exist in the `/public` directory.
# We're replacing it with our `Gitlab::Middleware::Static` that does the same,
# except ignoring `/uploads`, letting those go through to the GitLab Rails app.
app.config.middleware.swap( app.config.middleware.swap(
ActionDispatch::Static, ActionDispatch::Static,
Gitlab::Middleware::Static, Gitlab::Middleware::Static,
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment