Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image preview - 400 Bad Request #929

Open
valentin2105 opened this issue Sep 19, 2024 · 4 comments
Open

Image preview - 400 Bad Request #929

valentin2105 opened this issue Sep 19, 2024 · 4 comments

Comments

@valentin2105
Copy link

Describe the bug
The preview of pictures don't work and return 400 Bad Request

To Reproduce
Install teable in production behind a reverse-proxy.

Additional context

The request is :

https://teable-qualif.domain.tld/_next/image?url=https%3A%2F%2Fteable-qualif.domain.tld%2Fapi%2Fattachments%2Fread%2Fpublic%2Favatar%2Fusr7fq1tWA25ZXMqguf&w=64&q=75

The answer is :

"url" parameter is valid but upstream response is invalid

I have tried few things :

  • I build my own image from v1.4.1 with :

connectSrc -> https://*
images -> protocol: https, hostename: *

ENABLE_CSP=false on Dockerfile

NEXT_ENV_IMAGES_ALL_REMOTE -> "true" on the running container

It doesn't change anything.

I also tried sed -i 's/app.use(helmet());/app.use(helmet({ crossOriginResourcePolicy: false, });/g' apps/nestjs-backend/src/bootstrap.ts but doesn't build.

Please can I have any help to fix this ?

@tea-artist
Copy link
Contributor

add an env NEXT_ENV_IMAGES_ALL_REMOTE=true in teable container should fix this problem, we will fix it in the next update

@valentin2105
Copy link
Author

@tea-artist, I already set this variable, doesn't fix my issue.

@tea-artist
Copy link
Contributor

Can you give a minimum reproducible yaml to help us better locate the problem?

@valentin2105
Copy link
Author

I run it on Kubernetes with Nginx Ingress proxy on front of it.

I use latest release v1.4.1

My env vars :

      - env:                                                                                                                                                                                    
        - name: TZ                                                                                                                                                                              
          value: "Pacific/Noumea"                                                                                                                                                               
        - name: POSTGRES_HOST                                                                                                                                                                   
          value: "vm-db01.placeholder.com"                                                                                                                                               
        - name: POSTGRES_PORT                                                                                                                                                                   
          value: "5566"                                                                                                                                                                         
        - name: POSTGRES_DB                                                                                                                                                                     
          value: "teable"                                                                                                                                                                       
        - name: POSTGRES_USER
          value: "teable"
        - name: POSTGRES_PASSWORD
          valueFrom:
            secretKeyRef:
              key: POSTGRES_PASSWORD
              name: teable-secrets
        - name: PRISMA_DATABASE_URL
          valueFrom:
            secretKeyRef:
              key: PRISMA_DATABASE_URL
              name: teable-secrets
        - name: PUBLIC_ORIGIN
          value: "https://teable.placeholder.com"
        - name: PUBLIC_DATABASE_PROXY
          value: "127.0.0.1:42345"
        - name: BACKEND_MAIL_HOST
          value: "appmail.province-sud.nc"
        - name: BACKEND_MAIL_PORT
          value: "587"
        - name: BACKEND_MAIL_SECURE
          value: "false"
        - name: BACKEND_MAIL_SENDER
          value: "[email protected]"
        - name: BACKEND_MAIL_SENDER_NAME
          value: "Teable"
        - name: BACKEND_MAIL_AUTH_USER
          value: "appli.teable"
        - name: BACKEND_MAIL_AUTH_PASS
          valueFrom:
            secretKeyRef:
              key: BACKEND_MAIL_AUTH_PASS
              name: teable-secrets
        - name: NEXT_ENV_IMAGES_ALL_REMOTE
          value: "true"
        - name: ENABLE_CSP
          value: "false"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants