From 0a0e1774d7ff25dfd6605ce4dfdc7dfdeb45eb5e Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 31 Mar 2023 11:05:10 +0700 Subject: show content only iframe --- indoteknik_custom/controllers/__init__.py | 1 + indoteknik_custom/controllers/website.py | 36 +++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 indoteknik_custom/controllers/__init__.py create mode 100644 indoteknik_custom/controllers/website.py (limited to 'indoteknik_custom/controllers') diff --git a/indoteknik_custom/controllers/__init__.py b/indoteknik_custom/controllers/__init__.py new file mode 100644 index 00000000..02ab5287 --- /dev/null +++ b/indoteknik_custom/controllers/__init__.py @@ -0,0 +1 @@ +from . import website \ No newline at end of file diff --git a/indoteknik_custom/controllers/website.py b/indoteknik_custom/controllers/website.py new file mode 100644 index 00000000..2e3df519 --- /dev/null +++ b/indoteknik_custom/controllers/website.py @@ -0,0 +1,36 @@ +from odoo.http import request, Controller +from odoo import http, _ + +class Website(Controller): + @http.route('/content', auth='public') + def content(self, **kw): + url = kw.get('url', '') + iframe = f"" + style = ''' + + ''' + script = ''' + + ''' + content = '' + '' + iframe + style + script + '' + '' + return request.make_response(content, [('Access-Control-Allow-Origin', '*'), ('Access-Control-Allow-Headers', '*')]) \ No newline at end of file -- cgit v1.2.3