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

Cloudfront urls are http instead of https which break snack #33

Open
peterpme opened this issue Jun 30, 2021 · 6 comments
Open

Cloudfront urls are http instead of https which break snack #33

peterpme opened this issue Jun 30, 2021 · 6 comments

Comments

@peterpme
Copy link

I was digging into why my font wasn't showing up on Snack. I console logged the package and saw that the url was http instead of https. I grabbed the URL directly and added https and it worked

https://snack.expo.io/@peterpme/broken-inter-font-with-http
https://snack.expo.io/@peterpme/working-inter-font-with-https

@ccheever
Copy link
Contributor

ccheever commented Jun 30, 2021

Hmmm... I don't know why we would ever use an http URL. Do you see an easy place to transform it to https?

@peterpme
Copy link
Author

Hey, thanks for the quick response!

When I console.log:

import { useFonts, Inter_900Black } from '@expo-google-fonts/inter';
console.log(Inter_900Black)

The URL returned is a cloudfront url. I'm not sure its specific to google's because there's snackager in the url: http://d37p21p3n8r8ug.cloudfront.net/snackager-1%2F%40expo-google-fonts~inter%400.1.0-web/assets/_inter_900black.ttf

The urls here all have https:
https://github.com/expo/google-fonts/blob/master/packages/expo-google-fonts/index.js

That being said, in all the font-specific packages, I do see http: https://github.com/expo/google-fonts/search?q=http%3A%2F%2F

I imagine there's a script we can run to process those URLs when generating the individual package?

@ccheever
Copy link
Contributor

ccheever commented Jun 30, 2021 via email

@peterpme
Copy link
Author

Awesome, thank you!

@ccheever
Copy link
Contributor

ccheever commented Jun 30, 2021 via email

@byCedric
Copy link
Member

byCedric commented Jul 1, 2021

@IjzerenHein and I are going to test this PR which should fix this issue. Changing this has a big impact, so we prefer to fully test it on staging before rolling it out on production.

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

No branches or pull requests

3 participants