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

update nginx.conf to block plex news #28

Merged
merged 2 commits into from
Oct 3, 2017
Merged

Conversation

zenjabba
Copy link
Contributor

@zenjabba zenjabba commented Oct 2, 2017

Given people are not comfortable with Plex News, this can disable it on your end clients without any modifications to the clients. (v1.9.2 PlexServer)

Given people are not comfortable with Plex News, this can disable it on  your end clients without any modifications to the clients. (v1.9.2 PlexServer)
@toomuchio
Copy link
Owner

Plex News? Do you have a screenshot of the before and after of what this does? I've never seen it before.

@zenjabba
Copy link
Contributor Author

zenjabba commented Oct 2, 2017 via email

Copy link
Owner

@toomuchio toomuchio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch to spaces instead of tabs, you need to add.
Under line 81.
#Disables compression between Plex and Nginx, required for sub_filter #proxy_set_header Accept-Encoding "";

84 change to: #Example of sub_filter to alter what Plex displays, this disables Plex News.

I'll approve that I guess.

@toomuchio toomuchio merged commit d4d88f9 into toomuchio:master Oct 3, 2017
@toomuchio
Copy link
Owner

Merged very cool hack I was using something similar very early on to try and display messages to people but didn't work out well.

Might be work investigating manipulation of the xml to display alerts to users, creating fake librarys or menu options perhaps to alert people of changes to your Plex server.

@sander1
Copy link
Contributor

sander1 commented Jan 8, 2018

This is nice :) I have added this to my config:

location / {
	sub_filter '</body>' '<script src="/my.js"></script></body>';
	sub_filter_once on;
}

Now when the web interface loads it also loads my /my.js file, in which I can do some nice and/or funny things. For example set/change some of Plex Web's preferences:

  • Set Time Format to display a 24 hour clock;
  • Set Video Quality to "Maximum".
(function() {
	if (typeof(Storage) !== "undefined") {
		var experience = {"timeFormat": "HH:mm", "remoteQuality": "-1"};
		localStorage.setItem("experience", JSON.stringify(experience));
	}
})();

Note: This only works if people visit my PMS through my own domain, not through plex.tv

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

Successfully merging this pull request may close these issues.

3 participants