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

Prefix apple-touch-icon links with PUBLIC_URL #8005

Merged
merged 1 commit into from
Nov 24, 2019
Merged

Prefix apple-touch-icon links with PUBLIC_URL #8005

merged 1 commit into from
Nov 24, 2019

Conversation

benblank
Copy link
Contributor

The link for apple-touch-icon is the only URL in the templates' index.htmls that is relative, rather than using the %PUBLIC_URL% prefix.

Having all URLs in index.html be absolute makes it possible to host the site in one URL and alias index.html from another. This is helpful, for example, when proxying a site into an Azure Functions domain.

Copy link
Contributor

@mrmckeb mrmckeb left a comment

Choose a reason for hiding this comment

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

I'm OK with this, but I thought that this worked without the full URL (it resolves to the same path)?

@ianschmitz @iansu any thoughts?

@ianschmitz
Copy link
Contributor

Being consistent with the favicon makes sense to me.

@benblank
Copy link
Contributor Author

I thought that this worked without the full URL (it resolves to the same path)?

It's a heck of a corner case, but say you have homepage in package.json set to /client/. If you then alias only / to /client/index.html on the server (a bit weird, but definitely convenient in some cases1), then the apple-touch-icon would be resolved to <host>/logo192.png while everything else gets resolved to e.g. <host>/client/favicon.ico.

1 Such as on an Azure Functions host, where you have to individually alias files in the root (to avoid also aliasing /api/, where your functions live). It's much more convenient to alias the single / path.

@mrmckeb mrmckeb merged commit 5d24a5e into facebook:master Nov 24, 2019
@benblank benblank deleted the public-touch-icon branch November 24, 2019 22:30
@ianschmitz ianschmitz added this to the 3.3 milestone Nov 27, 2019
@lock lock bot locked and limited conversation to collaborators Dec 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants