Skip to content

Allow Hosting deploys with no public dir in some circumstances.#3351

Merged
mbleigh merged 4 commits intomasterfrom
mb-nopublic
May 13, 2021
Merged

Allow Hosting deploys with no public dir in some circumstances.#3351
mbleigh merged 4 commits intomasterfrom
mb-nopublic

Conversation

@mbleigh
Copy link
Copy Markdown
Contributor

@mbleigh mbleigh commented May 11, 2021

Description

Allows no public directory:

  • When dynamic rewrites are present (and no static rewrites).
  • When redirects are present.

Also refactors and TypeScript-ifies some of the Hosting deploy code.

Scenarios Tested

  • Deployed a standard site with a public directory.
  • Deployed a site with no public dir but with a function rewrite.
  • Deployed a site with no public dir but with a run rewrite.
  • Deployed a site with no public dir but with a redirect.
  • Deployed a multi-site (just to make sure it was still working)

Fixes #3349

- When dynamic rewrites are present (and no static rewrites).
- When redirects are present.

Also refactors and TypeScript-ifies some of the Hosting deploy code.
@mbleigh mbleigh requested a review from bkendall May 11, 2021 03:25
@google-cla google-cla Bot added the cla: yes Manual indication that this has passed CLA. label May 11, 2021
Copy link
Copy Markdown
Contributor

@bkendall bkendall left a comment

Choose a reason for hiding this comment

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

LGTM, but could the fixtures/simple be changed to fixtures/simplehosting? Otherwise other "simple" things are going to be lumped into it, I'm sure.

@mbleigh mbleigh merged commit c83934a into master May 13, 2021
@mbleigh mbleigh deleted the mb-nopublic branch May 13, 2021 18:39
jthegedus added a commit to jthegedus/firebase-tools that referenced this pull request Jul 24, 2021
@steren
Copy link
Copy Markdown

steren commented Jul 24, 2021

Please ask questions on Stack overflow. Not on this Pull Request

@qnxdev
Copy link
Copy Markdown

qnxdev commented Jul 24, 2021

Not needed anymore. I think GCF sucks. I moved to Vercel. It's better with SSR and functions.

bkendall added a commit that referenced this pull request Jul 26, 2021
Co-authored-by: Bryan Kendall <bkend@google.com>
@firebase firebase locked as resolved and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes Manual indication that this has passed CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redirect all requests to a Function or Cloud Run service without any public directory

4 participants