On this page
Define your scope with Compass
Browsers send a lot of traffic that is not part of your test, such as analytics and fonts. Compass keeps that traffic out of your project. Every extension in Marasi uses the same scope.

Write your scope
Your scope is Lua code in the Compass editor. Each rule is a regular expression that matches a host or a URL. A rule that starts with - excludes what it matches.
This example keeps two hosts and drops images and fonts from the project:
local scope = marasi:scope()
scope:clear_rules()
scope:set_default_allow(false)
scope:add_rule([[^(www|api)\.example\.com$]], "host")
scope:add_rule([[-.*\.(png|jpg|woff2?)$]], "url")
function processRequest(request)
if not scope:matches(request) then
request:skip()
end
end
function processResponse(response)
if not scope:matches(response) then
response:skip()
end
endYou choose what happens to traffic that is out of scope:
skip()sends the request on, but Marasi does not save it.drop()blocks the request. It never reaches the server.
Apply your changes
- Open the Marasi menu.
- Select Update Compass Code.
Marasi runs the code and shows Updated Compass. New traffic follows the new scope.
Test a URL
- Click Compass Settings.
- In the URL box, type a URL, such as
https://api.example.com/v1/users. - Click Test Rules.
The result shows if the URL is in scope and which rule matched it.