Shazwazza / Articulate

A wonderful Blog engine built on Umbraco
MIT License
211 stars 106 forks source link

Resolves #385. #386

Closed FloppyChips closed 1 year ago

FloppyChips commented 2 years ago

Resolves #385.

FloppyChips commented 2 years ago

Please can we progress this one, we'd like to include this project in our release. Great job by the way! Regards Stuart

Shazwazza commented 2 years ago

Hi thanks for this. It's been a long time since I looked at that code but IIRC there was a reason why 'localhost' needed to be checked there. Any chance you can provide me with some additional context as to these changes while you were debugging? I just don't want to release a breaking change.

FloppyChips commented 2 years ago

True this doesn't seem to have changed since first written. We noticed a problem when we added a second domain under the Culture and Hostnames settings in Umbraco, so we now have 1) https://localhost:44300 and 2) https://some_real_domain. I can't say this won't break anything but I think its clear there is some inconsistency between the hosts that are going into the list _urlNames and how they are being matched at the moment. It might be that checking for "localhost" at both points would also be a fix. Note that we wanted to have multiple blogs eventually but at the moment we just moved the Blog from under the root to under a sub-node.

FloppyChips commented 2 years ago

I can confirm that

private const string DetectDomainAbsoluteUrl = "localhost";

also works for us if you would rather have that.

FloppyChips commented 2 years ago

I have proposed an update where "localhost" is used in the comparison as discussed above, this also works for us.