azure – Unable to embed Kibana dashboard on a reverse proxy server using Nginx

I am trying to embed a Kibana dashboard using Nginx, but keep getting a blank screen. No errors are thrown (except for the expected “inline script” error), but nothing gets loaded. Kibana is deployed on an Azure cloud, and I don’t have admin access, so I am unable to edit the .yaml file.
Here is my Nginx config file:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
        listen       80;
        server_name  localhost;

        location / {
            root   html;
            index  index.html index.htm;
        }

        location /api {
            proxy_pass http://localhost:8080/<client>/api;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $remote_addr;
        }

        location /kibana/ {
            add_header X-my-debug $http_referer;
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/;
            sub_filter_once     off;
            sub_filter          'src="bootstrap.js'  'src="/kibana/bootstrap.js';
            proxy_set_header    X-Real-IP $remote_addr;
            proxy_set_header    Authorization '<auth-info>';
            proxy_set_header    X-Found-Cluster cbca73a5db19409287b3e17ef1a3df82;
            proxy_set_header    Host $host;
            proxy_set_header    X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header    X-Forwarded-Proto $scheme;
            proxy_set_header    Connection "Keep-Alive";
            proxy_set_header    Proxy-Connection "Keep-Alive";
            proxy_redirect    off;
            add_header          Content-Security-Policy "script-src 'self' <company-name>.azure.elastic-cloud.com:<port> 'unsafe-inline' 'unsafe-eval';" always;
        }

        location /bootstrap.js {
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/bootstrap.js;
            add_header          Content-Security-Policy "script-src 'self' https://<company-name>.azure.elastic-cloud.com:<port> 'unsafe-inline' 'unsafe-eval';" always;
        }

        location /39457/ {
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/39457/;
            add_header          Content-Security-Policy "script-src 'self' https://<company-name>.azure.elastic-cloud.com:<port> 'unsafe-inline' 'unsafe-eval';" always;
        }

        location /translations/ {
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/translations/;
        }

        location /node_modules/@kbn/ui-framework/dist/kui_light.css {
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/node_modules/@kbn/ui-framework/dist/kui_light.css;
        }

        location /ui/legacy_light_theme.css {
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/ui/legacy_light_theme.css;
        }
        
        location /api/core/capabilities {
            proxy_pass         https://<company-name>.azure.elastic-cloud.com:<port>/api/core/capabilities;
        }

        location /ui/fonts/inter_ui/ {
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/ui/fonts/inter_ui/;
        }
        
        location /internal/ {
            proxy_set_header    Authorization '<auth-info>';
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/internal/;
        }

        location /api/licensing/info {
            proxy_set_header    Authorization '<auth-info>';
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/api/licensing/info;
        }

        location /api/saved_objects_tagging/tags {
            proxy_set_header    Authorization '<auth-info>';
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/api/saved_objects_tagging/tags;
        }

        location /logout {
            proxy_set_header    Authorization '<auth-info>';
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/logout;
        }

        location /api/ui_counters/_report {
            proxy_set_header    Authorization '<auth-info>';
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/api/ui_counters/_report;
        }

        location /api/security/logout {
            proxy_set_header    Authorization '<auth-info>';
            proxy_pass          https://<company-name>.azure.elastic-cloud.com:<port>/api/security/logout;
        }

        # redirect server error pages to the static page /50x.html
        error_page   500 502 503 504  /50x.html;
    }

}

and I also have this in my index.html:

<meta http-equiv="Content-Security-Policy" 
  content="
  script-src 'self' https://<company-name>.azure.elastic-cloud.com:<port> 'unsafe-inline' 'unsafe-eval';
  frame-src 'self'https://<company-name>.azure.elastic-cloud.com:<port> 'unsafe-inline';
  style-src 'self' https://<company-name>.azure.elastic-cloud.com:<port> 'unsafe-inline';"
  >

mongodb – User followers – Embed or reference

So I have users collection and each user can follow other users. I can think of 2 ways to solve this.

  • followers collection and reference follower by id and user id which follows
  • follows_users field in users with ids of users that this user follows

What if there are 1000 followers and more? follows_users will have 1000 entries. Do you think separate “many-to-many” collection followers will be a good fit here?

How do I embed Google Tasks on Google Sites?

I would like to embed Google Tasks on my Google Sites dashboard. It is possible to see it on its own webpage with this link: https://tasks.google.com/embed/list/~default.

Image from https://tasks.google.com/embed/list/~default

When I try to embed it in Google Sites though, I get this error:
error notification

Clicking “Reauthenicate” opens a new tab with the task list, but I want it to work in a Google Sites dashboard I have for myself. Is this possible? It might be for a normal website, but I specifically want to use it in Google Sites. I can do this with Google Calendar, so I figured it is possible with Google Tasks.

jquery – How to embed content into an existing page using (wordpress)?

I need to embed content (created using Elementor) into an existing page.
I tried ifram and it embeds the content but it’s too slow when loading it.
Would you please let me know how to embed the content using <script>.....</script>?

Code I tried:

jQuery( ".dwqa-question-template-default div.site" ).prepend( '<iframe id="dwqasq"
src="https://www.webstudioq.com/ko/test-sq/" frameborder="0" scrolling="no" 
style="overflow:hidden; height:350px; width:100%;"></iframe>' );

Existing code (created using plugin):

<body class="dwqa-question-template-default>
    <div id="page" class="site grid-container container hfeed">
         <div id="content" class="site-content">
         </div>
     </div>
</body>

Thank you.

How to embed YouTube videos into Facebook web pages?

How to embed YouTube videos into Facebook web pages? – Web Applications Stack Exchange

Can’t embed code that contains script on Wiki page

I’m trying to embed some code on a wiki page in the Modern Sharepoint site but I get the following error:

This HTML cannot be inserted because you don’t have access to add
scriptable Web Parts in this site. Please contact your administrator
if you think you should have rights to do so.

However I believe I’ve done all the required steps:

  1. Used Shell to do: Set-SPOSite "https://mySuperSecretURL.sharepoint.com" -DenyAddAndCustomizePages 0.
  2. Gone to the Admin Page -> Settings -> Custom Script -> Changed to ‘Allow’ for all features (however this is just for the Classic site so I doubt it makes a difference but I want to be thorough).
  3. Confirmed I am a Site Administrator.
  4. Site Settings -> HTML Field Security -> Allow Contributors to insert iframes from any domain (I’m not doing this but again, being thorough).

Is there something I’m missing? I can’t even enter an empty script so I know it’s not bad code.

SharePoint Script Error

web part – How to Embed/ Display a PPT on SharePoint Intranet Site

I am trying to embed a ppt viewer into our company’s internal shared site where internal users can easily view my team’s software documentation. The company is fairly large, so we are trying to make it look very professional for when other teams visit my team’s page for software documentation. I saw on a completely unrelated website their document viewer and I want to display our documents in a similar type of box.

Below is a screen shot of the document viewer that I want it to look like (identifying information blocked out). The document viewer option that comes standard with the SharePoint does not have the side panel that offers a glance to the other pages like this one does. I see similar document viewers on other websites as well, so I know it can be done!

Goal Document View

Current PPT Web Part

My questions are: Is it possible to embed a similar style of view into my own SharePoint using the “document viewer” web part in the SharePoint or will I need to use some other method? Also, is there a name for the goal style of document viewer?

Embed PDF into SharePoint with pages view

I am trying to embed a PDF viewer into our company’s internal shared site where internal users can easily view my team’s software documentation. The company is fairly large, so we are trying to make it look very professional for when other teams visit my team’s page for software documentation. I saw on a completely unrelated website their document viewer and I want to display our documents in a similar type of way.

Below is a screen shot of the document viewer that I want it to look like (identifying information blocked out). The document viewer option that comes standard with the SharePoint does not have the side panel that offers a glance to the other pages like this one does. I see similar document viewers on other websites as well, so I know it can be done!

This is my previous post about embedding a PPT but never thought to add it in as a PDF, and it is already looking better. How to Embed/ Display a PPT on SharePoint Intranet Site

This is the end goal:

End Goal

This is how it currently is:
Current

My questions are: Is it possible to embed a similar style of view into my own SharePoint?

web application – Is it possible to embed a phar archive into a PNG image?

I know it’s possible to embed phar archives into jpeg images but is it also possible to do so with PNG images? I am testing a php application that securely checks if an image is a valid PNG image however it calls vulnerable filesystem functions like file_exists on said file, so I am curious if this is a potential attack vector – and if this is a potential attacker vector how could I embed the phar archive into the image? Is it strikingly similar to embedding phar archives into jpeg images? Or is there a different technique for doing this?

python – Embed a mini-window in a resizable canvas

I have a resizable canvas, and I want to add a mini-window that I obtained via a previous question.

The code is too long to be shared, that’s why I’m sharing snippets of code with you

class ResizableCanvas(Canvas):

    def __init__(self, parent, **kwargs):
        Canvas.__init__(self, parent, **kwargs)
        self.bind("<Configure>", self.on_resize)
        self.height = self.winfo_reqheight()
        self.width = self.winfo_reqwidth()

    def on_resize(self, event):
        wscale = float(event.width) / self.width
        hscale = float(event.height) / self.height
        self.width = event.width
        self.height = event.height
        self.config(width=self.width, height=self.height)


class ViewerTab:
    def __init__(self, master, quit_import, dim=1000):

    
        self.coords = {"x": 0, "y": 0, "x2": 0, "y2": 0}

        self.lines = ()
        self.oval = ()
        self.rectangle = ()
        self.arc = ()

        self.canvas = ResizableCanvas(self.master,
                                      width=dim,
                                      height=dim,
                                      highlightthickness=0,
                                      bg="lavender")
        self.canvas.pack(fill=BOTH, expand=YES)
        

        self.canvas.bind("<Button-1>", self.dirbutton)
        self.canvas.bind("<B1-Motion>", self.move)
        self.canvas.bind("<ButtonRelease-1>", self.nomove)
        self.canvas.bind("<Button-2>", self.get_position)
        self.canvas.bind('<Button-3>', self.xy)

    def initView(self):

        self.canvas.delete('all')

        self.image = self.initImage()

        self.angle = 0
        self.redraw()
        self.isSlideOn = True

    def initViewSuperposed(self):

        self.canvas.delete('all')


        self.image = self.initImage()
        self.cmap = self.initImagePng()
        self.cmap = PIL.Image.fromarray((self.cmap * 255).astype(numpy.uint8))
        self.isSuperposed = True
        self.isSlideOn = True
        self.set_labels()
        self.redrawSuperposed()


    def my_resize(self, size):
        needed_y , needed_x = size
        size_new_image = max((needed_x,needed_y))
        new_image = PIL.Image.new('RGBA',(size_new_image,size_new_image),color=(255,255,255,0))
        n = numpy.array(new_image)
        factor = (2**self.level)
        pixel_size = 1

        for key in self.positions.keys():
            if key != 'size_x' and key != 'size_y':
                xo = int( (key(0) *598) / factor)
                yo = int( (key(1) *598) /factor)


            if self.level > 7:
                pixel_size = 1

            if self.level == 7:
                pixel_size = 4

            if self.level == 6:
                pixel_size = 9

            if self.level == 5:
                pixel_size = 18

            if self.level == 4:
                pixel_size = 37

            if self.level == 3:
                pixel_size = 74

            elif self.level == 2:
                pixel_size = 149

            elif self.level == 1:
                pixel_size = 299

            elif self.level == 0:
                pixel_size = 598

            for i in range(pixel_size):
                for j in range(pixel_size):
                    x_good = xo + i
                    y_good = yo + j
                    if x_good > needed_x:
                        x_good = 0
                    if y_good > needed_y:
                        y_good = 0
                    n(x_good,y_good) = self.positions(key)

        new_image = PIL.Image.fromarray(n)
        
        return new_image



    def dirbutton(self, event):
        if self.mode.get() == "pan":
            if self.isSlideOn:
                if self.tool == "slide":
                    self.xref = event.x
                    self.yref = event.y
        if self.mode.get() == "annotate" or self.mode.get() == "line" :
            self.canvas.scan_mark(event.x, event.y)

    def move(self, event):
        if self.mode.get() == "pan":
            if self.isSlideOn:
                if self.tool == "slide":
                    dpx = (event.x - self.xref)
                    dpy = (event.y - self.yref)
                    self.canvas.delete("image")
                    self.canvas.create_image(-self.canvas.width + dpx,
                                            -self.canvas.height + dpy, anchor=NW,
                                            image=self.photoimage, tags="image")
            
        if self.mode.get() == "annotate" or self.mode.get() == "line" or self.mode.get() == "oval" or self.mode.get() == "rectangle" or self.mode.get() == "arc":
            self.canvas.scan_dragto(event.x, event.y, gain=1)
    
    def nomove(self, event):
        if self.mode.get() == "pan":
            if self.isSuperposed:
                if self.tool == "slide":
                    self.image = self.translateImage(self.xref,
                                                        self.yref,
                                                        event)
                    self.redrawSuperposed()
        
            if self.isSlideOn and self.isSuperposed == False:
                if self.tool == "slide":
                    self.image = self.translateImage(self.xref,
                                                        self.yref,
                                                        event)
                    self.redraw()
            
  
    def get_position(self, event):
        factory = (-1)*int(numpy.sin(numpy.radians(self.angle))) + int(numpy.cos(numpy.radians(self.angle)))
        factorx = int(numpy.sin(numpy.radians(self.angle))) + int(numpy.cos(numpy.radians(self.angle)))*(-1)**(self.angle/90)
        if self.flip:
            event.x = self.canvas.width - event.x
        if self.angle % 180 == 0:
            abs_x = factorx*event.x + self.canvas.width*2**(self.angle/180) - self.cmapx
            abs_y = factory*event.y + self.canvas.height*2**(self.angle/180) - self.cmapy
        else:
            abs_x = factory*event.y + (3*self.canvas.width+self.canvas.height*(factorx))/2 - self.cmapx
            abs_y = factorx*event.x + (3*self.canvas.height+self.canvas.width*(factory))/2 - self.cmapy
        factor_resize_x = self.cmap_resize.size(0)/self.cmap_png.shape(0)
        factor_resize_y = self.cmap_resize.size(1)/self.cmap_png.shape(1)
        index_x = int(abs_x/factor_resize_x)
        index_y = int(abs_y/factor_resize_y)
        messagebox.showinfo('Patch coordinates', 'X: % d n Y: % d' % (index_x, index_y))

And the code I want to add is here:

from tkinter import Tk, Canvas
from PIL import Image, ImageTk
import requests

try:
    open('space.jpg')
except FileNotFoundError:
    url = 'https://images5.alphacoders.com/866/866360.jpg'
    img = requests.get(url)
    if img.status_code == 200:
        with open('space.jpg', 'wb') as file:
            file.write(img.content)
        print('File not found. Downloaded the necessary file.')
    else:
        print('File not found. Could not download the necessary file.')
        exit()


start_coords = {'x': 0, 'y': 0, 'move': False}

def set_start_coords(event):
    x1, y1, x2, y2 = nav_canvas.coords(nav_box)
    if x1 < event.x < x2 and y1 < event.y < y2:
        start_coords('x') = event.x - x1
        start_coords('y') = event.y - y1
        start_coords('move') = True
    else:
        start_coords('move') = False

def move_coords(event):
    if not start_coords('move'):
        return

    dx = start_coords('x')
    dy = start_coords('y')
    x = event.x - dx
    y = event.y - dy

    if x < 0:
        x = 0
    elif x + 70 > 200:
        x = 130
    if y < 0:
        y = 0
    elif y + 50 > 100:
        y = 50

    nav_canvas.coords(nav_box, x, y, x + 70, y + 50)
    main_canvas.coords(main_image_id, -x * 10, -y * 10)
root = Tk()
image = Image.open('space.jpg')
main_image = ImageTk.PhotoImage(image)
nav_image = ImageTk.PhotoImage(image.resize((200, 100), Image.ANTIALIAS))

main_canvas = Canvas(root, width=700, height=500, highlightthickness=0)
main_canvas.pack()
main_image_id = main_canvas.create_image((0, 0), image=main_image, anchor='nw')

nav_canvas = Canvas(width=200, height=100, highlightthickness=0)
main_canvas.create_window((500, 400), window=nav_canvas, anchor='nw', tags='nav_canvas')

nav_canvas.create_image((0, 0), image=nav_image, anchor='nw')
nav_box = nav_canvas.create_rectangle((0, 0, 70, 50), outline='white')

nav_canvas.bind('<Button-1>', set_start_coords)
nav_canvas.bind('<B1-Motion>', move_coords)

root.mainloop()

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheap USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Best Quality USA Private Proxies