Menu items in the issue menu are not onionized #22

Closed
opened 11 months ago by kreyren · 4 comments

image

![image](/attachments/159f6c14-97f5-4337-9c11-c52c44c7207f)
Poster

Maybe this could have a UI update on upstream e.g. if gitea is deployed on onions to show two links to copy there?

Maybe this could have a UI update on upstream e.g. if gitea is deployed on onions to show two links to copy there?
wanderer added this to the Grow our .onionz milestone 11 months ago
wanderer added this to the General project 11 months ago
Owner

Maybe this could have a UI update on upstream e.g. if gitea is deployed on onions to show two links to copy there?

that is a good idea.
I think another app.ini config variable would be needed, such as ONION_DOMAIN
it could then easily be used anywhere else, as needed

> Maybe this could have a UI update on upstream e.g. if gitea is deployed on onions to show two links to copy there? that is a good idea. I think another `app.ini` config variable would be needed, such as `ONION_DOMAIN` it could then easily be used anywhere else, as needed
wanderer added a new dependency 11 months ago
Owner

alright for now I have been able to solve this using nginx's sub_filter

# hidden-gitea
location / {
    sub_filter_types text/css text/xml application/javascript;
    sub_filter '<a href="https://git.dotya.ml'  '<a href="/';
    sub_filter '<div class="item context clipboard" data-clipboard-text="https://git.dotya.ml/' '<div class="item context clipboard" data-clipboard-text="$scheme://$host/';
    ...
    proxy_pass http://gitea;
}

...

note that substitutions in text/html are implicit, hence not specified another time.

if you find another occurences of the git.dotya.ml/ strings in places where / would do, please. post them here.

@kreyren

alright for now I have been able to solve this using nginx's sub_filter ```nginx # hidden-gitea location / { sub_filter_types text/css text/xml application/javascript; sub_filter '<a href="https://git.dotya.ml' '<a href="/'; sub_filter '<div class="item context clipboard" data-clipboard-text="https://git.dotya.ml/' '<div class="item context clipboard" data-clipboard-text="$scheme://$host/'; ... proxy_pass http://gitea; } ... ``` note that substitutions in `text/html` are implicit, hence not specified another time. if you find another occurences of the `git.dotya.ml/` strings in places where `/` would do, please. post them here. @kreyren
Owner

I'll go ahead and close this, since I believe the stuff above has fixed the issue.
Should anything appear again, feel free to reopen.

I'll go ahead and close this, since I believe the stuff above has fixed the issue. Should anything appear again, feel free to reopen.
wanderer closed this issue 6 months ago
Sign in to join this conversation.
Loading…
There is no content yet.