Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggles for qbittorrent's themepark "add-on" #184

Closed
bonny1992 opened this issue Feb 8, 2024 · 2 comments
Closed

Toggles for qbittorrent's themepark "add-on" #184

bonny1992 opened this issue Feb 8, 2024 · 2 comments

Comments

@bonny1992
Copy link


Describe the problem
If using qbittorrent with themepark enabled with organizr, if you put it in iframe it won't work.
It's because the themepark role sets the frame-ancestors self custom HTTP header in qbit's option.

Describe any solutions you think might work
I solved it by using this header:

frame-ancestors https://organizr.mydomain.com http://organizr:80 self https://qbittorrent.mydomain.com http://qbittorrent:8080

(I'm unsure whether adding the internal address does something or not to be fair)
Using the config file or the inventory system we could set add additional domains to the "base" install of themepark within Qbit, like this maybe:

qbittorrent_themepark_custom_domains: 
   - https://organizr.mydomain.com
   - http://organizr:80 
   - https://qbittorrent.mydomain.com 
   - http://qbittorrent:8080

and Saltbox can add it alongside the original self

@saltydk
Copy link
Member

saltydk commented Feb 8, 2024

Specifically this is about these two settings tweaks here:

- name: Post-Install | Settings | Update WebUI\CustomHTTPHeaders 'qBittorrent.conf' config settings
community.general.ini_file:
path: "{{ qbittorrent_paths_conf }}"
section: Preferences
option: WebUI\CustomHTTPHeaders
value: "{{ qbittorrent_themepark_headers if qbittorrent_themepark_enabled and global_themepark_plugin_enabled else '' }}"
no_extra_spaces: true
state: present
owner: "{{ user.name }}"
group: "{{ user.name }}"
mode: "0775"
- name: Post-Install | Settings | Update WebUI\CustomHTTPHeadersEnabled 'qBittorrent.conf' config settings
community.general.ini_file:
path: "{{ qbittorrent_paths_conf }}"
section: Preferences
option: WebUI\CustomHTTPHeadersEnabled
value: "{{ 'true' if qbittorrent_themepark_enabled and global_themepark_plugin_enabled else 'false' }}"
no_extra_spaces: true
state: present
owner: "{{ user.name }}"
group: "{{ user.name }}"
mode: "0775"

saltydk added a commit that referenced this issue Feb 8, 2024
@saltydk saltydk closed this as completed in 89213c9 Feb 8, 2024
@saltydk
Copy link
Member

saltydk commented Feb 8, 2024

In the case of using theme.park you would probably just modify

qbittorrent_themepark_headers: "\"content-security-policy: default-src 'self'; style-src 'self' 'unsafe-inline' theme-park.dev raw.githubusercontent.com use.fontawesome.com; img-src 'self' theme-park.dev raw.githubusercontent.com data:; script-src 'self' 'unsafe-inline'; object-src 'none'; form-action 'self'; frame-ancestors 'self'; font-src use.fontawesome.com;\""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants