Iis reverse proxy almost working

System Information
  • Strapi Version: 3.6.5
  • Operating System: windows 10 & server 2019
  • Database: sqlite
  • Node Version: 12.18.2
  • NPM Version: 6.14.5
  • Yarn Version: 1.22.4

I setup an IIS reverse proxy to map localhost to localhost:1337 on a newly created strapi project and everything seemed to be working until I tried to check the “Collection Types”, “Single Types” or “Configure View”.

Collection Types and Configure View do nothing but show a spinning waiting graphic.

I created a new single type with 1 text field named Home. Checking the link goes to:

localhost/admin/plugins/content-manager/singleType/application::home.home

[note: In the following error @localhost/… is actually @http://localhost/… the system wont allow more than 2 links]
but I get an error:

Something went wrong.

Details
currentContentTypeLayoutData.layouts is undefined
EditView/<@localhost/admin/main.93a5e400.chunk.js:184345:4143 SingleTypeFormWrapper@localhost/admin/main.93a5e400.chunk.js:257178:1143
oh@localhost/admin/main.93a5e400.chunk.js:122057:146
di@localhost/admin/main.93a5e400.chunk.js:122079:309
ci@localhost/admin/main.93a5e400.chunk.js:122079:139
ai@localhost/admin/main.93a5e400.chunk.js:122078:178
Rj@localhost/admin/main.93a5e400.chunk.js:122172:238
Qj@localhost/admin/main.93a5e400.chunk.js:122150:267
Kj@localhost/admin/main.93a5e400.chunk.js:122150:194
yj@localhost/admin/main.93a5e400.chunk.js:122143:172
fg/<@localhost/admin/main.93a5e400.chunk.js:122027:115 exports.unstable_runWithPriority@localhost/admin/main.93a5e400.chunk.js:122234:467
cg@localhost/admin/main.93a5e400.chunk.js:122026:325
fg@localhost/admin/main.93a5e400.chunk.js:122027:63
gg@localhost/admin/main.93a5e400.chunk.js:122026:496
Ig@localhost/admin/main.93a5e400.chunk.js:122134:156
zh@localhost/admin/main.93a5e400.chunk.js:122067:514
e/<@localhost/admin/main.93a5e400.chunk.js:78:330589
tryCatch@localhost/admin/main.93a5e400.chunk.js:81338:40
invoke@localhost/admin/main.93a5e400.chunk.js:81568:30
defineIteratorMethods/</<@localhost/admin/main.93a5e400.chunk.js:81393:21 asyncGeneratorStep@localhost/admin/main.93a5e400.chunk.js:78:18171
i@localhost/admin/main.93a5e400.chunk.js:78:18407

I’ve gone thru all of the documentation and tried every configuration suggested to no results.

Everything works if I use localhost:1337 and I am even getting data from the localhost endpoints. I populated fields in Home and checked localhost/home and was returned json. But for whatever reason I cannot get the collection or single types thru the proxy.

Using nginx will complicate things as I am running multiple asp.net sites. There has to be a way to configure the proxy on IIS it’s almost there.

hi @wileyknight have you manage to sort it out? I’m facing the same problem with version 4.0.6 that via localhost:1337 everthing works fine and via the iis site with the host header and reverse proxy i get the" do nothing but show a spinning waiting graphic" when accessing the Content Manager.

Looking forward to your reply.

probebly the solution is to enter in the web.config

<system.web>

 <httpRuntime requestPathInvalidCharacters="" />


    </system.web>

As the error other wise will be “A potentially dangerous Request.Path value was detected from the client”

1 Like

Hello guys, any news on this topic ? @idc-dev_idc-dev I am so glad you came up with a solution. I wonder how safe it is any clue ?

@leitnermat As long you are using iis purley as a reverse proxy and not mixing with some .net code on that site so I don’t see a problem with that.
If you need protection I don’t think that to count on the asp.net request validation is enough.