manyfold
manyfold copied to clipboard
Previews not visible behind cloudflare proxying
Hi guys,
I'm having an issue where the stl previews don't seem to be rendering correctly, they just show as a grey box as seen below.
I can download the files fine and the .png file preview seems to work. the files inside the container are root:root 775. Sometimes when i move from page to page i will see the stl files render for a split second but them disappear again. could it be maybe something different about my stl files thats causing the renderer to crash? they are all exported from tinkercad if that makes any different? here's an example stl wyse_bottom.stl.zip
checked the /logs URL but don't see any specific errors that stand out logs.zip
running from the latest container image on ubuntu 20.04.03 lts, 5.4.0 docker ver 20.10.2:2291f61
my compose
version: "3"
services:
app:
image: ghcr.io/floppy/van_dam:latest
container_name: 3dp
ports:
- 3214:3214
volumes:
- "/var/lib/docker/containers/3dp/libraries:/libraries"
environment:
DATABASE_URL: postgresql://username:[email protected]/van_dam?pool=5
SECRET_KEY_BASE:
GRID_SIZE: 260
depends_on:
- db
- redis
networks:
new-macvlan-network:
ipv4_address: 172.16.1.75
db:
image: postgres:13
container_name: 3dp_postgres
volumes:
- "/var/lib/docker/containers/3dp-db/data:/var/lib/postgresql/data"
environment:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
ports:
- 5432:5432
restart: always
networks:
new-macvlan-network:
ipv4_address: 172.16.1.76
redis:
image: redis:6
container_name: 3dp_redis
restart: on-failure
networks:
new-macvlan-network:
ipv4_address: 172.16.1.77
volumes:
3dp_db_data:
networks:
new-macvlan-network:
external:
name: new-macvlan-network
Any other logs I can look at to help narrow down the issue? or things to test out? Thanks.
Bit more digging about and i think it's related to cloudflare proxy settings as when i jump into the container host, the stl previews are fine, and when i disable auto-proxy for that subdomain, it renders correctly.
Seems like the "rocketloader" is mangling the application.js in someway preventing the previews from rendering. could possibly be fixed by rearranging the order with which content is loaded?
workaround is to create a new rule in your cloudlfare dashboard(Rules>Page Rule>New rule)
put in your domain: sub.example.com/*
and select the below option

Oh, that's interesting! Are you running it on a cloud server then that's behind cloudflare? I've only ever run it locally, so this is a whole new potential place for problems 😁
Can I ask - where did you find the software? I've never had anyone using it before I don't think, and suddenly there are a bunch of issues coming in (unsurprisingly!)
Oh, that's interesting! Are you running it on a cloud server then that's behind cloudflare? I've only ever run it locally, so this is a whole new potential place for problems 😁
I have it self hosted on a local machine with nginx proxy manager in front of it, and I have cloudflare as my NS and proxying it again to hide my local IP. but seems it's doing a lot more than just proxying by default.
Can I ask - where did you find the software? I've never had anyone using it before I don't think, and suddenly there are a bunch of issues coming in (unsurprisingly!)
David over at DBTech done a nice video about it here - https://www.youtube.com/watch?v=FWj7WNPjOCw
Thank you for the link! It's amazing that it's been found! I'll try to take a look into what might be happening...
Rocket Loader™ is known to break some pages, but you should be able to set an exclusion rule for VanDAM.
@DarrenF-G did you ever get this working with rocketloader?
For people who come here having the issue that the previews seem to load, but never show: Try disabling your Darkmode extension. I use Dark Reader, and with it on, all the STL preview things were just gone.
Not a bug on Van DAMs side, but I found this trying to figure this out, and then realized it might be the dark mode extension messing with it.
PS: @ Floppy, love the software, thanks for making it. Setup is a bit rough, but the actual experience using it is great. Only thing I needed to do, is setting a password so I can make it available from the outside without exposing anything.