Closed ryan953 closed 8 hours ago
Could build-in a way i guess. Whether the code is injected or not isn't a huge deal because it's inert anyway. I just want it skipped so the payload is a little bit smaller....
There will be a followup though to make this page look nice, so importing global styles (or bootstrapping react + emotion? idk), so not over-over yet.
The popup we're talking about looks like this right now, with or without the login_as stuff appended is the same.
All modified and coverable lines are covered by tests :white_check_mark:
:white_check_mark: All tests successful. No failed tests found.
In getsentry we inject some login code to the bottom of rendered templates, we don't need this to happen inside our toolbar popup; and we can skip it by omitting the
</body>
tag form the template.class ViewAsRenderMiddleware
will replace</body>
with the content of https://github.com/getsentry/getsentry/blob/3cff20a7236510b918e785e3cd50a3cd20434207/getsentry/templates/viewas/header.html#L1