README.md in mission_control-servers-0.2.6 vs README.md in mission_control-servers-0.2.8
- old
+ new
@@ -91,17 +91,21 @@
## Protecting the Dashboard
You can protect the dashboard by using a constraint. This will allow you to only allow certain users to access
-the dashboard. However, the ingress still needs to be accessible by the servers which are being monitored.
+the dashboard. However, the ingress still needs to be accessible by the servers which are being monitored. In
+order to install the script on the servers, you also have to expose the endpoint for the script.
```ruby
Rails.application.routes.draw do
+ get '/mission_control-servers/projects/:project_id/script', to: 'mission_control/servers/scripts#show'
+ post '/mission_control-servers/projects/:project_id/ingress', to: 'mission_control/servers/ingresses#create'
+
constraints AdminConstraint do
mount MissionControl::Servers::Engine => "/mission_control-servers"
end
- post '/mission_control-servers/projects/:project_id/ingress', to: 'mission_control/servers/ingresses#create'
+
end
```
In this example, we have directly given a path to the ingress, but locked down everything else to the AdminConstraint.
The AdminConstraint takes in the request and calls the `matches?` method. If the method returns true,