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

Support both HTTP and HTTPS URLs in http_server.pl #510

Merged
merged 1 commit into from
Sep 14, 2015

Conversation

ebardsley
Copy link
Contributor

This fixes 4 regular expressions to permit either HTTP or HTTPS.

This is useful in the case that MH is being accessed from behind a proxy, such as apache or nginx, that is terminating HTTPS for the application.

@hollie
Copy link
Owner

hollie commented Jun 2, 2015

Hello fellow developers,

is there somebody who has a setup that allows testing this fix? If you have please verify this pull request so that we can merge it into master.

I'm not running MisterHouse behind a proxy so I cannot test it myself.

Thanks,
Lieven.

@ebardsley
Copy link
Contributor Author

If anyone would like to test this, here's the relevant part of my nginx
configuration, with the bold parts needing to be changed. (mh is on port
8080.) A self-signed cert should work fine for testing.

server {
listen 443 default ssl;
server_name my.host.name http://my.host.name;
ssl_certificate* /path/to/hostname-2015.chained.crt_;
ssl_certificate_key */path/to/hostname-2015.key_;

ssl_protocols TLSv1.2;
ssl_ciphers  HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers  on;

add_header Strict-Transport-Security max-age=604800;

location / {
  proxy_pass http://127.0.0.1:8080;
  proxy_redirect https://$host:8080/ /;
  proxy_redirect http://$host:8080/ /;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Scheme $scheme;
  proxy_connect_timeout 1;
  proxy_send_timeout 30;
  proxy_read_timeout 30;
}

}

On Tue, Jun 2, 2015 at 12:56 PM, Lieven Hollevoet [email protected]
wrote:

Hello fellow developers,

is there somebody who has a setup that allows testing this fix? If you
have please verify this pull request so that we can merge it into master.

I'm not running MisterHouse behind a proxy so I cannot test it myself.

Thanks,
Lieven.


Reply to this email directly or view it on GitHub
#510 (comment).

@hollie
Copy link
Owner

hollie commented Jul 2, 2015

@ebardsley just as a small update: I have referenced your pull request in a mail to the MisterHouse mailing list.

@ebardsley
Copy link
Contributor Author

@hollie It's been a month, and that thread seems unlikely to result in comprehensive unit test coverage in the near term. What would you like to do with these mostly-trivial regex changes?

@hollie
Copy link
Owner

hollie commented Aug 4, 2015

Hey Ed,

you're right, I'll merge them in.

Thanks for the contribution and the reminder.

Kind regards,
Lieven.

hollie added a commit that referenced this pull request Sep 14, 2015
Support both HTTP and HTTPS URLs in http_server.pl
@hollie hollie merged commit 786fe51 into hollie:master Sep 14, 2015
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.

2 participants