[NEW] Automatic install mailhog. Mailhog integration in Odoo
This commit is contained in:
@@ -14,13 +14,8 @@ MAILHOG_BASE = "http://localhost:8025"
|
||||
|
||||
class MailcatcherProxy(http.Controller):
|
||||
|
||||
@http.route('/mailcatcher', type='http', auth='user', website=False)
|
||||
def mailcatcher_index(self, **kw):
|
||||
"""Redirect to the MailHog UI index page."""
|
||||
return request.redirect('/mailcatcher/')
|
||||
|
||||
@http.route('/mailcatcher/<path:subpath>', type='http', auth='user',
|
||||
website=False, csrf=False)
|
||||
@http.route(['/mailcatcher', '/mailcatcher/<path:subpath>'],
|
||||
type='http', auth='user', website=False, csrf=False)
|
||||
def mailcatcher_proxy(self, subpath='', **kw):
|
||||
"""Proxy requests to the local MailHog instance."""
|
||||
target_url = f"{MAILHOG_BASE}/{subpath}"
|
||||
|
||||
Reference in New Issue
Block a user