Allow-Control-Allow-Origin Extension Configuration

Configure Allow-Control-Allow-Origin Extension

Configure Allow-Control-Allow-Origin * in the extension. Also, for localhost, you need to add <code>Access-Control-Allow-Origin:*</code> to the http header and also add it to the extension's Expose-header.

Shou Arisaka
1 min read
Nov 17, 2025

This time, we’ll introduce how to configure Allow-Control-Allow-Origin: * in Chrome extensions.

{/* “Allow-Control-Allow-Origin: *” extension configuration. */} Allow-Control-Allow-Origin: * extension configuration.

:///* ://localhost:3000/

Also, for localhost, you need to add Access-Control-Allow-Origin:* to the http header, and also add it to the extension’s Expose-header.

To add http header in Rails, write the following in the Controller corresponding to the view:

response.set_header('Access-Control-Allow-Origin', '*')

By adding the http header as above, you can use the Allow-Control-Allow-Origin: * extension even for localhost.

Also, in the case of Rails, you can add the http header to all Controllers by writing the following in config/application.rb:

config.action_dispatch.default_headers = {
  'Access-Control-Allow-Origin' => '*'
}

That’s all.

Share this article

Shou Arisaka Nov 17, 2025

🔗 Copy Links