Closed artemtech closed 3 years ago
hey netlify folks! if anyone is going to merge this, please make sure it still works in our infra by testing on staging. This we are important because we are not observing #44 and I wonder why.
Hello. Thanks @artemtech. Im try, and it works perfect for recieving files, but when im trying to delete from admin panel, this link again generates without %2F and of course 404 eror
@heopz-vpf would you please to test it out again, i've tested it in my setup and it working now.
Thanks @artemtech ! It works perfect now.
thanks @lbischof ! your suggestion also works in my setup and we can do sorting our posts ^^
Came across this issue recently, and running docker build
against the forked branch in this PR fixed the issue immediately for me. Would be great if I could run upstream instead of a fork :)
Sorry for the delay reviewing this. We'll try to follow up on this next week. I would add small comment on the code, that I think it is better to add some unit tests for this scenario - it would make it easier for us to reproduce the issue.
This is not needed. The correct Apache configuration is described here: https://stackoverflow.com/a/9933890
I fixed this by adding nocanon
to the ProxyPass
. I also added AllowEncodedSlashes NoDecode
, because otherwise Apache returns a 404 error.
@artemtech can you close this issue if you're able to fix this in your webserver config?
This is not needed. The correct Apache configuration is described here: https://stackoverflow.com/a/9933890
I fixed this by adding
nocanon
to theProxyPass
. I also addedAllowEncodedSlashes NoDecode
, because otherwise Apache returns a 404 error.
ah i see,
in webserver view, your approach also worked in my nginx setup, by doing some rewrite url like this: https://serverfault.com/a/906479
i think i should open issue in this repo: https://github.com/hfte/netlify-cms-with-selfhosted-gotrue-and-git-gateway , because i followed that deploy journey :)
this is my rewrite config in my nginx setup:
location /.netlify/git/ {
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^ $request_uri;
rewrite ^/.netlify/git(/.*) $1 break;
return 400;
proxy_pass http://gitgateway$uri;
}
thanks all, will close this PR @mraerino
Fix #44 .
The idea is based on GitLab API specification that need "%2F" in repository subfolders and repository name. let say we have these scenario:
GITGATEWAY_GITLAB_REPO=artemtech/play-netlifycms
(in .env file), andcontent/post/2015-01-04-first-post.md
filein gitlab.go, these repo will be encoded into
artemtech%2Fplay-netlifycms
. But, the repository contents is not encoded as well (not in %2F form), see:/gitlab.com/api/v4/projects/artemtech%2Fplay-netlifycms/repository/files/content/post/2015-01-04-first-post.md/raw
we need to encode
content/post/2015-01-04-first-post.md
part, intocontent%2Fpost%2F2015-01-04-first-post.md
.so the Opaque URL will become:
/gitlab.com/api/v4/projects/artemtech%2Fplay-netlifycms/repository/files/content%2Fpost%2F2015-01-04-first-post.md/raw