You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I send this issue for show how enable CORS without modify Prestashop code using a .htaccess file. In this way only works with Apache HTTP server and miss configurations for others HTTP servers, like Nginx.
My prupose is for add this script in the main README and help other users when working with SPA and need enable CORS.
Thank's for your project!
PD. Sorry for mi english!
<IfModule mod_headers.c>
Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Headers "Content-Type, Authorization, Io-Format, Accept"
Header always set Access-Control-Allow-Methods "GET,POST,HEAD,DELETE,PUT,OPTIONS"
</IfModule>
<IfModule mod_rewrite.c>
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
</IfModule>
The text was updated successfully, but these errors were encountered:
On Thu, Dec 5, 2019 at 7:48 PM Aran Moncusí Ramírez < ***@***.***> wrote:
You're welcome! Only one thing, this example is for Apache, not Nginx! 😆
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=AAVEKYNCOU6PDPQOLUNM7VTQXFEH3A5CNFSM4IWCCWP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGBXDOQ#issuecomment-562262458>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVEKYKYDBIINMOGIBFL2Q3QXFEH3ANCNFSM4IWCCWPQ>
.
Hi!
I send this issue for show how enable CORS without modify Prestashop code using a
.htaccess
file. In this way only works with Apache HTTP server and miss configurations for others HTTP servers, like Nginx.My prupose is for add this script in the main
README
and help other users when working with SPA and need enable CORS.Thank's for your project!
PD. Sorry for mi english!
The text was updated successfully, but these errors were encountered: