<h4 dir="auto">Describe the bug</h4>
<p dir="auto"><code class="notranslate">config.paramsSerializer.indexes = false</code> (default) adds indexes if an object is inside an array but it shouldn't.</p>
<h4 dir="auto">To Reproduce</h4>
<p dir="auto"><a href="https://runkit.com/doits/634530f2d3a446000813ef73" rel="nofollow">https://runkit.com/doits/634530f2d3a446000813ef73</a></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var axios = require(&quot;axios&quot;)

const req = await axios.get('https://www.example.com', { params: { a: [{ name: 'abc' }], b: ['x', 'y'] } })

console.log(req.request.path)

// =&gt; &quot;/?a[0][name]=abc&amp;b[]=x&amp;b[]=y&quot;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">axios</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"axios"</span><span class="pl-kos">)</span>

<span class="pl-k">const</span> <span class="pl-s1">req</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">axios</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s">'https://www.example.com'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">params</span>: <span class="pl-kos">{</span> <span class="pl-c1">a</span>: <span class="pl-kos">[</span><span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'abc'</span> <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">b</span>: <span class="pl-kos">[</span><span class="pl-s">'x'</span><span class="pl-kos">,</span> <span class="pl-s">'y'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>

<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">.</span><span class="pl-c1">request</span><span class="pl-kos">.</span><span class="pl-c1">path</span><span class="pl-kos">)</span>

<span class="pl-c">// =&gt; "/?a[0][name]=abc&amp;b[]=x&amp;b[]=y"</span></pre></div>
<h4 dir="auto">Expected behavior</h4>
<p dir="auto">No <code class="notranslate">a[0]</code> but <code class="notranslate">a[]</code>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// =&gt; &quot;/?a[][name]=abc&amp;b[]=x&amp;b[]=y&quot;"><pre class="notranslate"><span class="pl-c">// =&gt; "/?a[][name]=abc&amp;b[]=x&amp;b[]=y"</span></pre></div>
<h4 dir="auto">Environment</h4>
<ul dir="auto">
<li>Axios Version 1.1.2</li>
</ul>
<h4 dir="auto">Additional context/Screenshots</h4>
<p dir="auto">None</p>
<p dir="auto">Axios - fails</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="	axios('https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', {
		method: 'HEAD',
		mode: 'no-cors',
		headers: {
			'Access-Control-Allow-Origin': '*',
			Accept: 'application/json',
			'Content-Type': 'application/json',
		},
		withCredentials: true,
		credentials: 'same-origin',
		crossdomain: true,
	}).then((response) =&gt; {
		console.log(response);
	}).catch((e) =&gt; {
		console.log(e);
	});"><pre class="notranslate">	<span class="pl-en">axios</span><span class="pl-kos">(</span><span class="pl-s">'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
		<span class="pl-c1">method</span>: <span class="pl-s">'HEAD'</span><span class="pl-kos">,</span>
		<span class="pl-c1">mode</span>: <span class="pl-s">'no-cors'</span><span class="pl-kos">,</span>
		<span class="pl-c1">headers</span>: <span class="pl-kos">{</span>
			<span class="pl-s">'Access-Control-Allow-Origin'</span>: <span class="pl-s">'*'</span><span class="pl-kos">,</span>
			<span class="pl-c1">Accept</span>: <span class="pl-s">'application/json'</span><span class="pl-kos">,</span>
			<span class="pl-s">'Content-Type'</span>: <span class="pl-s">'application/json'</span><span class="pl-kos">,</span>
		<span class="pl-kos">}</span><span class="pl-kos">,</span>
		<span class="pl-c1">withCredentials</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
		<span class="pl-c1">credentials</span>: <span class="pl-s">'same-origin'</span><span class="pl-kos">,</span>
		<span class="pl-c1">crossdomain</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span>
	<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
		<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
	<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
		<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
	<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Fetch - works</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="	const testURL = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
	const myInit = {
		method: 'HEAD',
		mode: 'no-cors',
	};

	const myRequest = new Request(testURL, myInit);

	fetch(myRequest).then(function(response) {
		return response;
	}).then(function(response) {
		console.log(response);
	}).catch(function(e){
		console.log(e);
	});"><pre class="notranslate">	<span class="pl-k">const</span> <span class="pl-s1">testURL</span> <span class="pl-c1">=</span> <span class="pl-s">'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'</span><span class="pl-kos">;</span>
	<span class="pl-k">const</span> <span class="pl-s1">myInit</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
		<span class="pl-c1">method</span>: <span class="pl-s">'HEAD'</span><span class="pl-kos">,</span>
		<span class="pl-c1">mode</span>: <span class="pl-s">'no-cors'</span><span class="pl-kos">,</span>
	<span class="pl-kos">}</span><span class="pl-kos">;</span>

	<span class="pl-k">const</span> <span class="pl-s1">myRequest</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">Request</span><span class="pl-kos">(</span><span class="pl-s1">testURL</span><span class="pl-kos">,</span> <span class="pl-s1">myInit</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

	<span class="pl-en">fetch</span><span class="pl-kos">(</span><span class="pl-s1">myRequest</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
		<span class="pl-k">return</span> <span class="pl-s1">response</span><span class="pl-kos">;</span>
	<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
		<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">response</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
	<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">catch</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
		<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
	<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h4 dir="auto">Summary</h4>
<p dir="auto">in Axios I get the following cors error but if I replace with standard fetch it works fine.<br>
I've tried a few different configurations with axios and must be missing something?</p>
<p dir="auto">Error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Failed to load https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access."><pre class="notranslate"><code class="notranslate">Failed to load https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
</code></pre></div>
<h4 dir="auto">Context</h4>
<ul dir="auto">
<li>axios version: * axios v0.17.1</li>
<li>Environment: * Chrome 63.0.3239.132 (Official Build) (64-bit)</li>
</ul>