Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/consts/src/regexs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const APIFY_PROXY_VALUE_REGEX = /^[\w._~]+$/;
// http://123123:qweqwe:asdasd@proxy.com:55555
// http://proxy.apify.com:5000
// http://root@proxy.apify.com:5000
export const PROXY_URL_REGEX = /^http:\/\/(([^:]+:)?[^@]*@)?[^.:@]+\.[^:]+:[\d]+?$/;
export const PROXY_URL_REGEX = /^https?:\/\/(([^:]+:)?[^@]*@)?[^.:@]+\.[^:]+:[\d]+?$/;

/**
* AWS S3 docs say:
Expand Down
2 changes: 1 addition & 1 deletion packages/input_schema/src/intl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const intlStrings = {
'inputSchema.validation.proxyGroupsNotAvailable':
'You currently do not have access to proxy groups: {groups}',
'inputSchema.validation.customProxyInvalid':
'Proxy URL "{invalidUrl}" has invalid format, it must be http://[username[:password]]@hostname:port.',
'Proxy URL "{invalidUrl}" has invalid format, it must be http[s]://[username[:password]]@hostname:port.',
'inputSchema.validation.apifyProxyCountryInvalid':
'Country code "{invalidCountry}" is invalid. Only ISO 3166-1 alpha-2 country codes are supported.',
'inputSchema.validation.apifyProxyCountryWithoutApifyProxyForbidden':
Expand Down
4 changes: 2 additions & 2 deletions test/utilities.client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -958,12 +958,12 @@ describe('utilities.client', () => {
const proxy = null;
const inputs = [
// Invalid
{ field: { useApifyProxy: false, proxyUrls: ['https://asdasd:qweqe@proxy.apify.com:8000'] } }, // https
{ field: { useApifyProxy: false, proxyUrls: ['http://asdasd:qweqe@proxy.apify.com'] } }, // missing port
{ field: { useApifyProxy: false, proxyUrls: ['http://asdasd:qweqe@proxy.apify.com:8000/asd'] } }, // path after port
{ field: { useApifyProxy: false, proxyUrls: ['http://asdasd@qweqe@proxy.apify.com:8000'] } }, // malformed url
{ field: { useApifyProxy: false, proxyUrls: ['http://asdasd:qweqe:proxy.apify.com:8000'] } }, // malformed url
// Valid
{ field: { useApifyProxy: false, proxyUrls: ['https://asdasd:qweqe@proxy.apify.com:8000'] } }, // https
{ field: { useApifyProxy: false, proxyUrls: ['http://proxy.apify.com:8000'] } }, // without auth
{ field: { useApifyProxy: false, proxyUrls: ['http://qweqe@proxy.apify.com:6000'] } }, // without password
{ field: { useApifyProxy: false, proxyUrls: ['http://asd:qweqe@proxy.apify.com:55555'] } }, // with auth
Expand All @@ -974,7 +974,7 @@ describe('utilities.client', () => {
.filter((errors) => errors.length > 0);

// There should be 5 invalid inputs
expect(results.length).toEqual(5);
expect(results.length).toEqual(4);
results.forEach((result) => {
// Only one error should be thrown
expect(result.length).toEqual(1);
Expand Down