Git Product home page Git Product logo

Comments (4)

wxiaoguang avatar wxiaoguang commented on June 14, 2024
  • Open web UI. Navigate to Profile -> Packages. You should see the pushed image with the name namespace/name.
  • Click on the said image.

What URL do you see? Could you copy out the original link to see whether it is a/b or a%2fb ?

from gitea.

d-danilov avatar d-danilov commented on June 14, 2024

What URL do you see? Could you copy out the original link to see whether it is a/b or a%2fb ?

When I click on a container in package list (name label is namespace/name), the URL is as follows: http://gitea.example.com/username/-/packages/container/namespace%2Fname/latest. So, with %2F. This page is 404.

from gitea.

wxiaoguang avatar wxiaoguang commented on June 14, 2024

If you access the URL with %2F directly, what does Gitea side see (the Gitea logs) ? If Gitea also sees %2F, then it is a Gitea's bug. If Gitea only sees /, then it is the reverse proxy's problem: it shouldn't decode the path.

from gitea.

d-danilov avatar d-danilov commented on June 14, 2024

If you access the URL with %2F directly, what does Gitea side see (the Gitea logs) ? If Gitea also sees %2F, then it is a Gitea's bug. If Gitea only sees /, then it is the reverse proxy's problem: it shouldn't decode the path.

Gitea sees /. And it is, apparently, a reverse proxy problem, as I am running Gitea behind an NGINX proxy.

I confirm that without NGINX reverse proxy, the issue does not reproduce.

I investigated the issue and managed to find a solution. It was incorrect reverse proxy configuration.

I had reverse proxy of NGINX configured as follows (unrelated directives are omitted for clarity):

location / {
    proxy_pass http://127.0.0.1:3000/;
}

Removing the trailing slash in proxy_pass directive fixed the issue.

location / {
    proxy_pass http://127.0.0.1:3000;
}

I also noticed that the correct configuration is also outlined in documentation.

@wxiaoguang Thank you for helping to figure this out! It was my mistake in the end.

from gitea.

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.