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

Adds the possibility of serving assets from application's domain #61

Merged
merged 2 commits into from
Sep 23, 2020

Conversation

nunomaduro
Copy link
Member

@nunomaduro nunomaduro commented Sep 22, 2020

This pull request adds the possibility of serving assets from application's domain.

This is particular useful for developers deploying PWAs using Vapor, as they may want to serve assets directly from their domains such us: your-domain.com/.well-known/assetlinks.json, or your-domain.com/serviceWorker.js.

To get started, developers just need to populate they serve_assets key in the config/vapor.php file:

/*
|--------------------------------------------------------------------------
| Serve Assets
|--------------------------------------------------------------------------
|
| Here you can configure list of public assets that should be
| served directly from your application's "domain" instead
| of the S3 asset bucket or the CloudFront's asset URL.
|
*/
'serve_assets' => [
    '.well-known/assetlinks.json',
    'serviceWorker.js',
],

Note: It's only possible to serve dot files as assets once this pull request gets merged.

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.

2 participants