IoIxD / dforum

Service that allows Discord forums to be indexed by Google and read without a Discord account.
ISC License
33 stars 3 forks source link

Handling custom domains #7

Open IoIxD opened 1 year ago

IoIxD commented 1 year ago

The current solution if somebody wants to bind a custom domain to their server listing is to just use php_get_contents or js fetch to fetch the contents of the site. This works somewhat, but what would be better is if you could do guildID.dfs.ioi-xd.net, and expect it to work the same as dfs.ioi-xd.net/guildID/.... Then, you could have your custom domain be a CNAME to that.

The code should be updated to handle both /guildID/... and guildID.dfs...

IoIxD commented 1 year ago

when a site cnames to another site, the first url gets passed to the request, not the second. so we'd have to have a server configure their domain through the bot anyways so we can handle it.

so there's no point in a new subdomain, or working with wildcard certificates. we should just have the user cname to dfs.ioi-xd.net and then have the code handle whatever domain the server configures.