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

OmbiV3 + Theme + nginx = Themes break #1795

Closed
1activegeek opened this issue Dec 13, 2017 · 13 comments
Closed

OmbiV3 + Theme + nginx = Themes break #1795

1activegeek opened this issue Dec 13, 2017 · 13 comments

Comments

@1activegeek
Copy link

Ombi build Version:

V 3.0.2459

Update Branch:

DotNetCore

Media Sever:

Plex

Operating System:

LS.io Dev Container

Problem Description:

Using nginx to front end OmbiV3 with HTTPS, redirecting to HTTP, with use of root URL of /requests. I noticed that as soon as I enable the root, restart, and validate connectivity - it seems themes break. I'm not sure if it's because the theme was enabled first, or if it's something to do with the connection through the proxy that is causing this. Happy to try and help provide any other valuable logging info, but there was nothing I could see of value in the 1 lines of log entries that existed.

Reproduction Steps:

Setup Ombi
Configure Base Path setting to something
Configure LayerCake theme
Use nginx to proxy this base path
Notice the lack of Theme skin

@1activegeek
Copy link
Author

Ok, so not necessarily a fix, but I have found a workaround for now. Though depending on how you plan to use it (assuming an nginx running front end, is expected to be used and only accessed through here). Not familiar with the LayerCake stuff yet, but I took a look and something caught my eye at the top of theme box:

<link rel="stylesheet" type="text/css" href="/api/v1/Settings/ThemeContent?url=https://raw.githubusercontent.com/leram84/layer.Cake/master/ombi/css/omBlur.css">

So I decided to alter this by inserting my /requests in front of the /api/v1....... Doing this and submitting, rectified the situation immediately upon a page refresh. Interestingly it looks like the original link directly to the server:port is still working, but I'd imagine there may be bugs in that interface now since the URL has been changed.

If this is deemed as the solution, perhaps maybe a quick note in the documentation with information around the nginx configs.

@tidusjar
Copy link
Member

Yeah you spotted and corrected the issue!

I need to add some code in the modify that when there is a base url

@CoderKiwi
Copy link

Has this been fixed?

@tidusjar
Copy link
Member

It's not broke, you can manually modify it like above

@CoderKiwi
Copy link

I'm running a Docker image... don't think I have access to manually change the CSS. Besides, it makes sense to add the baseURL string to the front of that CSS href. Seems like a simple enough change?

@tidusjar
Copy link
Member

Yes just change href="/api/v1/Settings/ThemeContent to href="/BASEURL/api/v1/Settings/ThemeContent

@1activegeek
Copy link
Author

@CoderKiwi - I'm running it as a docker as well. The change is not made in core files outside your container. It's made in the place where you setup the theme inside ombi. Go to the customization section where you selected the Blue theme, and in the box below it one of the first lines you'll see containers the line of code I posted above. Insert your modification, save (submit), profit.

@CoderKiwi
Copy link

@1activegeek Ah of course - thank you.

@anojht
Copy link
Contributor

anojht commented Apr 17, 2018

Hello everyone, a fix for this has been merged in the latest develop build, can anyone test and let us know if it has been resolved? Thank you!

@CoderKiwi
Copy link

Don't have nginx set up anymore so I can't test it right away, but I will say thank you for the fix! I'll let you know once I can test it.

@phairplay
Copy link

Hi I’ve made the change as above on the latest version and it still doesn’t load the pages correctly

@anojht
Copy link
Contributor

anojht commented May 29, 2018

You don't have to edit the url and insert your baseurl manually anymore, Ombi handles this automatically. Please revert you manual edits and use the latest version.

@Xodus-CO
Copy link

Xodus-CO commented Jun 3, 2018

On v. 3.0.3368 and the theme was still broken when behind nginx. Added the manual fix above and it resolved the issue.

Disregard. This was breaking due to settings for organizr in nginx.conf.

Removed the following:

location ~.(json|db|log|)$ {
return 404;
}

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

No branches or pull requests

6 participants