Menu items in the issue menu are not onionized #22

Closed
opened 2020-11-14 06:45:48 +01:00 by kreyren · 4 comments

image

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

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 2020-11-14 10:50:20 +01:00
wanderer added this to the General project 2020-11-14 10:50:24 +01:00
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 2020-11-14 10:59:08 +01:00
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.
Sign in to join this conversation.
No description provided.