GithubHelp home page GithubHelp logo

Comments (3)

lidel avatar lidel commented on August 16, 2024

@chrisschaub I was not able to reproduce.

You did not share your HAProxy configuration, but based on informaiton shared, this is likely a misconfiguration on your end (haproxy config and/or kubo config lacking explicit Gateway.PublicGateways defined).

Some things you may want to try:

  • use Gateway.PublicGateways configuration in Kubo to safelist domain(s) that you use with haproxy
  • inspect your HAproxy configuration and make sure it correctly forwards the Host header
    • You can also hardcode Host by passing explicit X-Forwarded-Host and X-Forwarded-Proto – see the first example in recipes

Lmk if any of this helped, or provide full configuration that reproduces the bug your experience (we can't help without reproduction steps). Thanks!

from kubo.

chrisschaub avatar chrisschaub commented on August 16, 2024

Assuming I don't need public gateways if I'm only trying to retrieve a local pinned ipfs file. I"ll check my haproxy config, but it's really simple:

global
  stats socket /var/run/api.sock user haproxy group haproxy mode 660 level admin expose-fd listeners
  log stdout format raw local0 info
  maxconn 50000

defaults
  log global
  mode http
  timeout connect 5s
  timeout client 10s
  timeout server 10s
  timeout http-request 10s

frontend ipfsgwhttp
  # listen for HTTP traffic
  bind :80
  # listen for HTTPS traffic, load certificates from an EFS directory
  bind :443 ssl crt /mnt/efs/haproxy/certs/
  # redirect HTTP to HTTPS
  http-request redirect scheme https unless { ssl_fc }
  # the pool of backend servers
  default_backend ipfsgw

backend ipfsgw
  server s1 gw-kubo:8080 check

from kubo.

chrisschaub avatar chrisschaub commented on August 16, 2024

Ok, the fix was to add

  option forwardfor
  http-send-name-header Host

to haproxy. Thank you for your patience.

from kubo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.