sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.84k stars 136 forks source link

Surge returns 404 if part path contains tld #374

Closed makoto closed 5 years ago

makoto commented 5 years ago

Hi, Currently our website has /name/domain.tld path to show some record based on the domain.

However if the tld ends in either .com, .org, or .xyz it throws 404 page

eg:

https://manager.ens.domains/name/resolver.com https://manager.ens.domains/name/resolver.xyz https://manager.ens.domains/name/resolver.org

However other domains or adding / at the end does not.

eg:

https://manager.ens.domains/name/resolver.net https://manager.ens.domains/name/resolver.eth https://manager.ens.domains/name/resolver.xyz/

The problem does not exist if we run the site (create react app) locally so wondering if surge has some 404 rule at system level.

makoto commented 5 years ago

Hello. Any response on this?

sintaxi commented 5 years ago

Thanks for the report and reminder. Taking a look and will try to get back to you shortly.

sintaxi commented 5 years ago

@makoto Looks like our fallback mime check was too conservative. Issue should be fixed now. Let me know if you have any other problems.

btw - Im assuming you are using 200.html file to test this feature. Let me know if that is not the case.

makoto commented 5 years ago

Hi, @sintaxi .com and .org looks ok, but .xyz is still showing 404

https://manager.ens.domains/name/resolver.xyz

PS: yes we have 200.html

Regards

Makoto

sintaxi commented 5 years ago

Thanks for testing. Looks like .xyz returns a mime of chemical/x-xyz. Just released another fix.

makoto commented 5 years ago

Thanks for responding so quickly! Looks working fine.