Skip to content

Conversation

@Snuupy
Copy link

@Snuupy Snuupy commented Nov 5, 2024

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description

Current reverse proxy config doesn't work for kobo

I don't necessarily expect this PR to get merged cus I actually think it's ugly that the proxy_set_header stuff is all repeated but it is what it is (current default borks for kobo, this one doesn't)

please feel free to refactor as necessary so it's not dirty

Benefits of this PR and context

kobo sync works now instead of fail/error, downloads work too

How Has This Been Tested?

I have a kobo and this works, original conf doesn't sync NOR download

Source / References

janeczku/calibre-web#1891 (comment)

Copy link
Contributor

@jgillman jgillman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK how to make a commit to your PR so I'll leave it as a comment instead 😅

If you remove the changes in the location / block you can simplify them and move them to a new block that will only affect the /kobo/ endpoint.

At the end of the server block you'd then add:

    location /kobo/ {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app calibre-web;
        set $upstream_port 8083;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
        proxy_set_header X-Scheme $scheme;
        proxy_buffer_size 128k;
        proxy_buffers 4 256k;
        proxy_busy_buffers_size 256k;
    }

@jgillman
Copy link
Contributor

Oh and you can also add the same changes to the calibre-web.subdomain.conf.sample version for completion :)

Copy link
Member

@Roxedus Roxedus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update the date on the top to a date later than what it has now.

# user also has a corresponding user manually created in Calibre-Web.

include /config/nginx/proxy.conf;
# original proxy.conf config without the incompatible proxy_buffer config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried overriding the required directives in this conf, rather than straight up circumventing proxy.conf?

@aptalca
Copy link
Member

aptalca commented Nov 26, 2024

Also, port 80 listen and http-->https redirect is not necessary as it's handled by default in default.conf

@drizuid
Copy link
Member

drizuid commented Dec 21, 2024

OP didn't respond and i merged a different fix, closing

@drizuid drizuid closed this Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants