Comments (8)
@syrys-lbsoft thanks for reporting this. This is a great analysis and I do agree with you. We certainly did not test with these domain setups.
from website.
@Sh1d0w that makes sense. I'll make that change asap.
from website.
culprit for the actual issue:
Line 49 in 3233b08
you can try copy that function into a JS console and try testing following domains:
example.com
subdomain.example.com
example.co.nz
subdomain.example.co.nz
assuming this can be easily fixed, i would still like to know the answer to my 2nd question:
I can easily create a certificate manually, is there a way to tell the component to skip ssl certificate creation and simply provide the certificate arn?
from website.
While on the same topic, following can also be improved:
Line 310 in 3233b08
Basically the logic there is to find the 1st hosted zone with the nakedDomain. im not really sure what the naked domain is in this project, but im going to assume its the top most domain. eg: one.two.example.com
, i assume nakedDomain is example.com. Remember, you could have a hosted zone that is a subdomain: two.example.com
, one.two.example.com
etc. Heck, you could even have 3 hosted zones here: one.two.example.com
and two.example.com
and example.com
. Basically, the find filter above will randomly find the "first" one, because its using includes
.
what should be happening is, breaking down the domain into parts: [one, two, example, com], then find the hosted zone that matches most (ofcorse excluding matches on just the tld). and use an exact match rather than includes, because that could then match someothersubdomain.example.com
because it contained example.com
.
...sorry if this is unnecessary or wrong place to post. my logic may be wrong, if so, please feel free to correct me. :)
from website.
@eahefnawy great, looks like easy fixes anyway. but, is there any chance that you guys can make the hostedZoneId and the certificateArn be able to be passed in (that should help people do some manual configurations where needed)? Im a tad unfamiliar with the serverless framework to know if i can do this locally for test and/or have a custom version for my self, so thought id suggest here.
Line 83 in 3233b08
Line 84 in 3233b08
and while you are at it, you could even make the nakedDomain configurable (1 line up), which will help anyone overwrite any similar cases in the future. I feel like the hostedZone and certificateArn has very good usecases where users have complicated setups in AWS.
from website.
@syrys-lbsoft you mean being able to overwrite with some new inputs?
from website.
Hi, is there any progress on this? It really does not work if you are using it for different environments, with env prefixed domains, e.g. dev.mysite.com
, stage.mysite.com
etc. It always resolves to the root certificate mysite.com
and the deployment is failing because of:
The certificate that is attached to your distribution doesn't cover the alternate domain name (CNAME) that you're trying to add
IMO the best solution would be to do what serverless-domain-manager
plugin is doing - expose an option for certificateName
so we can pass *.mysite.com
and fallback to auto guessing if it is not provided.
from website.
Update: I've published a patch that fixes the issue with domains like co.nz
. I've tested it on my end with .com.tr
and it works. @syrys-lbsoft would be great to confirm from your side as well.
from website.
Related Issues (20)
- Old build artifacts not removed from s3 HOT 3
- Serverless components website : Deploy failed with delegated domain HOT 1
- Incoherent bug happening for nuxt full static websites HOT 2
- Enhancement suggestion: set GZIP compression to true when creating Cloudfront distribution HOT 1
- CI - Error: Failed running "src.hook": "npm run build" due to the following error: Command failed: npm run build HOT 9
- Update react-starter template with latest library versions. Use functional component over class based component.
- Uploading just the static folder HOT 1
- TypeError: Cannot read property 'ping' of null HOT 2
- Wildcard Domains Fail HOT 1
- Serverless.yml env attribute HOT 1
- Deploy to different AWS accounts
- www -> root domain redirect Cloudfront clash
- Getting strange error: 10s › Serverless › ENOENT: no such file or directory, scandir '/tmp/amazvd'
- Angular support HOT 1
- NuxtJS deploy problems
- Adding custom security headers HOT 4
- Serverless 3.0 Issues
- Allow inputs.src.hook to expand variables
- Error when deploy on bitbucket
- Serverless command "init react-starter" not found !
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from website.