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

Allow admin paths to be set at server scope. #701

Merged
merged 1 commit into from May 12, 2014

Conversation

Projects
None yet
3 participants
@jeffkaufman
Copy link
Contributor

jeffkaufman commented May 12, 2014

Allow you to set MessagesPath, StatisticsPath, AdminPath, or ConsolePath in a server {} block.

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 12, 2014

This should be backported to master once ready.

@jmarantz

This comment has been minimized.

Copy link
Contributor

jmarantz commented May 12, 2014

LGTM

jeffkaufman added a commit that referenced this pull request May 12, 2014

Merge pull request #701 from pagespeed/jefftk-move-settings-to-server…
…-scope

move settings to server scope

Allow you to set `MessagesPath`, `StatisticsPath`, `AdminPath`, or `ConsolePath`  in a `server {}` block.

@jeffkaufman jeffkaufman merged commit a7fdc86 into trunk-tracking May 12, 2014

@jeffkaufman jeffkaufman deleted the jefftk-move-settings-to-server-scope branch May 12, 2014

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 12, 2014

Backported to master as 90e4c40.

@nikolay

This comment has been minimized.

Copy link
Contributor

nikolay commented May 22, 2014

Thanks for this! It was a bit messy to have this in the http {}!

@nikolay

This comment has been minimized.

Copy link
Contributor

nikolay commented May 22, 2014

@jeffkaufman Do we need to be adding in order to enable the admins?

location /pagespeed_admin { allow 127.0.0.1; deny all; }
location /pagespeed_global_admin { allow 127.0.0.1; deny all; }
@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 22, 2014

If you turn on any of these paths with pagespeed SomePath ... then it will be open to anyone. The suggested location blocks are for restricting the handler to some IP that you know only admins will have access to.

@nikolay

This comment has been minimized.

Copy link
Contributor

nikolay commented May 22, 2014

Okay, I didn't know they are disabled by default. It seems that pagespeed SomePath ...; is only for changing the default location.

@jeffkaufman

This comment has been minimized.

Copy link
Contributor

jeffkaufman commented May 22, 2014

With 1.8 they are now disabled by default; they didn't used to be. We don't want to be opening up these paths if people forget to put in the location ... { deny ... }.

@jmaessen jmaessen changed the title move settings to server scope Allow admin paths to be set at server scope. May 27, 2014

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