-
Notifications
You must be signed in to change notification settings - Fork 65
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
fix: support allow-unauthorized in aem up #2352
Conversation
There are more invocations of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's not enough.... search for all getFetch()
calls :-)
This PR will trigger a patch release when merged. |
src/up.js
Outdated
@@ -92,6 +92,12 @@ export default function up() { | |||
type: 'string', | |||
}) | |||
.group(['url', 'livereload', 'no-livereload', 'open', 'no-open', 'print-index', 'cache'], 'AEM Options') | |||
.option('allow-unauthorized', { | |||
alias: 'allowUnauthorized', | |||
describe: 'Whether to allow unauthorized access to server', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this is not a very good description... I think allowInsecure
would be better
src/server/BaseServer.js
Outdated
@@ -116,7 +116,7 @@ export class BaseServer extends EventEmitter { | |||
let retries = 1; | |||
if (this._project.kill && await utils.checkPortInUse(this._port, this._addr)) { | |||
try { | |||
const res = await getFetch()(`${this._scheme}://${this._addr}:${this._port}/.kill`); | |||
const res = await getFetch(this._project.allowInsecure)(`${this._scheme}://${this._addr}:${this._port}/.kill`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a request back to localhost, so if https, it most probably is a self-signed, to I would use true
by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably also add it here:
https://github.com/adobe/helix-cli/blob/ef79a85031259d242919baafd16b28a19a06aa46/src/server/HelixImportServer.js#L104C23-L104C29
IIRC, this was added because some imported sites had invalid certs, but I don't think this should be the default.
@kptdobe WDYT?
So yes, I agree we should harmonize the 2 servers and corresponding option handling. |
.option('allow-insecure', { | ||
alias: 'allowInsecure', | ||
describe: 'Whether to allow insecure requests to the server', | ||
type: 'boolean', | ||
default: false, | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe also add this to import.js
?
## [16.3.11](v16.3.10...v16.3.11) (2024-05-03) ### Bug Fixes * support allow-unauthorized in aem up ([#2352](#2352)) ([e5cdac0](e5cdac0))
fix #2351