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

Feat: Wildcard hostname #3124

Merged
merged 5 commits into from May 12, 2022
Merged

Feat: Wildcard hostname #3124

merged 5 commits into from May 12, 2022

Conversation

Meldiron
Copy link
Contributor

@Meldiron Meldiron commented Apr 20, 2022

What does this PR do?

  • We now support *.vercel.all or *.*.gitpod.io or even simply * hostnames
  • Hostname is now properly validated when creating/updating. You now cannot enter an invalid hostname
  • In UI, when platform update fails, refresh list so we don't have incorrect data in list

Test Plan

  • Manual QA:
  1. Don't allow port and path:
CleanShot.2022-04-20.at.11.36.53.mp4
  1. Ensure wildcard can be inserted properly:

CleanShot 2022-04-20 at 11 37 39

  1. Ensure wildcards are actually supported:

CleanShot 2022-04-20 at 11 43 25

(I was able to create and read an anonymous session from https://8080-meldiron-almostredditpla-1cocjbj09gp.ws-eu34xl.gitpod.io/index2.html with the hostname was *.*.gitpod.io or * or *.*.gitpod.*)

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

Yes

@Meldiron Meldiron mentioned this pull request Apr 20, 2022
2 tasks
<input name="hostname" type="text" class="margin-bottom" autocomplete="off" placeholder="localhost" required>
<label for="hostname">Hostname <span class="tooltip large" data-tooltip="The hostname that your website will use to interact with the <?php echo APP_NAME; ?> APIs in production or development environments. No protocol or port number required."><i class="icon-question"></i></span></label>
<input name="hostname" type="text" class="margin-bottom" autocomplete="off" placeholder="yourapp.com" required>
<div class="text-fade text-size-xs margin-top-negative-small margin-bottom">You can use * to allow wildcard hostnames or subdomains.</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, it might be cool to add small buttons to allow to quickly add *.vercel.app or *.netlify.app

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaand *.*.gitpod.io probably

app/controllers/api/projects.php Show resolved Hide resolved
src/Appwrite/Network/Validator/Host.php Outdated Show resolved Hide resolved
src/Appwrite/Network/Validator/Origin.php Outdated Show resolved Hide resolved
@Meldiron Meldiron changed the base branch from master to 0.14.x May 3, 2022 07:59
@TorstenDittmann TorstenDittmann merged commit b82010c into 0.14.x May 12, 2022
@TorstenDittmann TorstenDittmann deleted the fix-wildcard-hostname-new branch May 12, 2022 16:35
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.

None yet

3 participants