Skip to content

prevent functions domain and subdomain to be added as custom domain - #7933

Merged
eldadfux merged 5 commits into
refactor-usage-snfrom
pea-699
May 5, 2024
Merged

eldadfux merged 5 commits into
refactor-usage-snfrom
pea-699

Conversation

@lohanidamodar

@lohanidamodar lohanidamodar commented Apr 8, 2024 •

Copy link
Copy Markdown
Member

What does this PR do?

prevent functions domain and subdomain to be added as custom domain

Test Plan

  • Manually verified

Related PRs and Issues

  • (Related PR or issue)

Checklist

  • Have you read the Contributing Guidelines on issues?
  • If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?

@lohanidamodar lohanidamodar changed the title PEA-699 prevent functions domain and subdomain to be added as custom domain prevent functions domain and subdomain to be added as custom domain Apr 8, 2024

$functionsDomain = App::getEnv('_APP_DOMAIN_FUNCTIONS', '');
if (str_ends_with($domain, $functionsDomain)) {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your functions domain or it\'s subdomain to specific resource. Please use different domain.');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's add a test for this

@eldadfux
eldadfux merged commit 49a3a62 into refactor-usage-sn May 5, 2024
@lohanidamodar
lohanidamodar deleted the pea-699 branch May 5, 2024 05:54
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.

3 participants