xframe ALLOW-FROM is obsolete in all modern browsers #6766
Comments
|
Talked with @hkovacs via slack and I can confirm this is outdated, we may need to dig into the middleware and see if there is an updated or replacement for it. |
|
Potential replacement: https://github.com/venables/koa-helmet |
|
Thank you, I think this is a topic for @alexandrebodin . |
|
i have started on this, but it is a bit above my level... i have made the following surface changes:
i dont know where else to go with these changes, so i am happy for some pointers on where to look next... or perhaps this is all that is needed... |
|
i do think that this is a priority high given that the bug means that strapi is not fully secure while using koa-lusca which has been unsupported since before strapi was created and koa-lusca packages are obsolete in modern browsers. |
|
I would also class this as a bug @lauriejim (though I wouldn't say high) we do need to find a replacement. |
|
It would be fine to migrate to helmet but if we cannot map the old options to the new ones it will be a breaking change so won't happen until v4. |
im happy to attempt a try at doing this if someone can tell me where to look. it might take the same amount of time whether i help or wait for v4, so i am willing to try. |
|
Just so you have the full picture. v4 will only come at the end of year. If you want to work for the v4 then you can go further and merge the multiple middlewares into one middleware with options for each security layers. This would make it simpler for users to configure all their security middlewares at once. If you want to work on a v3 comptabile solution then you will need to work on keeping the same options and middlewares :) |
with time i will study v3 middleware and get a better grasp. see how it goes. |
Describe the bug
Using xframe
ALLOW-FROMthrows error in console:Invalid 'X-Frame-Options' header encountered when loading 'https://api.dev.mysite.com/uploads/my-file.pdf': 'ALLOW-FROM dev.mysite.com' is not a recognized directive. The header will be ignored.https://strapi.io/documentation/v3.x/concepts/middlewares.html#response-middlewares
instructions for xframe indicate
ALLOW-FROMwhich is obsolete per https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-OptionsSteps to reproduce the behavior
See docs
Expected behavior
i guess allow-from needs to be changed.
i tried using
frame-ancestorsbut it also wasnt recognized, so i dont have any suggestions at the momentScreenshots
none
Code snippets
System
Node.js version: v10.16.3
NPM version: 6.9.0
Strapi version: Strapi v3.0.4
Database: mongo v4.0.12
Operating system: ubuntu 18.04
Additional context
Thank you!
The text was updated successfully, but these errors were encountered: